Lokalization of Plugins (Translation of Pluggins to another language)

59 views
Skip to first unread message

Xrizzy One

unread,
Jan 10, 2021, 3:34:08 PM1/10/21
to TiddlyWiki
Hi everyone,

maybe someone can point me into the direction to start.

I want to translate some of the TiddlyWiki Plugins I use into German, but I have no how to start.

The Language plugin itself is only translating the core, right.

I searched all available documentation but was not able to find ans answer.

Thank you in advance for helping me out.

Odin

unread,
Jan 11, 2021, 1:43:45 AM1/11/21
to TiddlyWiki
Hi!

If you have a look at a core tiddlers for example, the new journal button, you will see that it uses transclusion of language tiddlers to display text. Changing your language in the settings will change the contents of these language tiddlers into the text of your other language.

\whitespace trim
\define journalButton()
<$button tooltip={{$:/language/Buttons/NewJournal/Hint}} aria-label={{$:/language/Buttons/NewJournal/Caption}} class=<<tv-config-toolbar-class>> actions={{$:/core/ui/Actions/new-journal}}>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
{{$:/core/images/new-journal-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text"><$text text={{$:/language/Buttons/NewJournal/Caption}}/></span>
</$list>
</$button>
\end
<<journalButton>>

I think this isn't the case for most plugins. They will just place English text where text is needed. If you want to translate a plugin, I think you will need to clone the plugin and change the text manually inside each plugin tiddler that contains visible English text. You could also go for the above way that is used in the core tiddlers and use set field widgets to change it to your desired language. I think this creates more flexibility as well as you can then switch back and forth with some buttons for example.
Op zondag 10 januari 2021 om 21:34:08 UTC+1 schreef xri...@web.de:

Xrizzy One

unread,
Jan 12, 2021, 5:16:53 AM1/12/21
to TiddlyWiki
Thank you for your quick reply Odin. You  are helping me a lot.

That is exactly what I would like to do: use the core concept with language tiddlers with the translation of tiddlers of the plugin. What I havent't figured out is the correct title (with the path) of such a tiddler. How exactly would I use set field widgets to change it to my desired language?
Reply all
Reply to author
Forward
0 new messages