I am completely lost with plugin translations.
Therefore I need to find another way to achieve my goal (bundle plugin with multiple translations). I think I should rely on the value returned by `$:/language/`, but I don't know how to write a macro which would concatenate the result returned by `$:/language/` with path to namespace of the plugin. I thought to store translation tiddlers under either:
- `$:/language/ru_RU/plugins/plugin_vendor/plugin_name/Note.multids`- `$:/plugins/plugin_vendor/plugin_name/languages/ru-RU/Note.multids`
Macro is a simple text substitution so it doesn't get the value of `$:/language/`. Do I need:
- a nested transclusion syntax- use of macrocall- use set or vars widgetBest regards,iilyak
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CAP2DrbT0d1J4kkzzTZ%2BuDUurk4ns4JFAr21VM_Sa2xbozch7RQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Hi Ilya
I am completely lost with plugin translations.The core doesn’t currently support translations for plugins, I’m afraid. That doesn’t stop you making a plugin that has multiple translations, but it means that you have to roll your own, including building an equivalent of the `lingo` macro.Therefore I need to find another way to achieve my goal (bundle plugin with multiple translations). I think I should rely on the value returned by `$:/language/`, but I don't know how to write a macro which would concatenate the result returned by `$:/language/` with path to namespace of the plugin. I thought to store translation tiddlers under either:
- `$:/language/ru_RU/plugins/plugin_vendor/plugin_name/Note.multids`- `$:/plugins/plugin_vendor/plugin_name/languages/ru-RU/Note.multids`Here’s one approach:<$set name="myLingoBase" value={{{ [[$:/plugins/plugin_vendor/plugin_name/]addsuffix{$:/language}] }}}>Translated, wikified string: <$transclude tiddler={{{ [<myLingoBase>addsuffix[/MyTranslatedString]] }}}/>Alternatively, without wikification: <$text text={{{ [<myLingoBase>addsuffix[/MyTranslatedString]get[text]] }}}/></$set>Here we construct a variable “myLingoBase” that will end up containing a string such as "$:/plugins/plugin_vendor/plugin_name/$:/languages/en-GB”. Then when we want to access a particular translatable string we just concatenate the final portion of the tiddler name and transclude it.Best wishesJeremy
Macro is a simple text substitution so it doesn't get the value of `$:/language/`. Do I need:
- a nested transclusion syntax- use of macrocall- use set or vars widgetBest regards,iilyak--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.
You may find this thread on tiddlywikidev useful:
https://groups.google.com/forum/#!topic/tiddlywikidev/fu0QFcs9O_U
Cheers
Sylvain
@sycom
The behaviour is somewhat different with the domain parameter : your translations will be in
domain/i18n/lg-LG
Default value is $:/ but it's up to you and might be $:/plugins/plugin_vendor/plugin_name and your translations will be in
$:/plugins/plugin_vendor/plugin_name/i18n/lg-LG
So it seems there's no conflict with your philosophy. But I guess documentation should be more explicit.
Cheers
Sylvain
@sycom
--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/h4UAjwbkdAk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d78b838d-8594-442e-b5bc-d42b7259f884%40googlegroups.com.