Just wanted to say thanks!
The PHP code in the examples could go in a snippet or plugin. The *tags* in the docs could go in a resource (document), a template, or a chunk.
I’ve been wondering about internationalizing 3PCs. SPForm, for example, has a bunch of language strings that are automatically loaded during the install. At present they are all in English, but I’m wondering what is supposed to happen when there are multiple language files.
Are we assuming that the transport package will load the ones consistent with the manager_language setting? Or that the user will be offered a choice of languages during the install? That seems like asking a lot from component developers and the internationalization docs are silent on this topic as far as I can tell.
Otherwise, though, it seems like the user is going to have to manually load the correct language strings with "import lexicon" for every 3PC that uses language strings. That doesn’t seem good either.
Am I missing something?
-
MODX Staff
- 10,725 Posts
You can distribute your add-ons as transport packages with as many translations as you want included, and you can even add options to the install to only install specific ones (up to you as component packager). You can even distribute the translations as separate transport packages; this is how I expect to distribute translations for core so that releases are not dependent on completion of particular translations that are included in core (the current situation with Evo).
I hadn’t thought of releasing a language pack as a separate transort package. That would make life a lot easier for everyone.
The only down side I see is that you might have to reinstall the language pack after updating the component.
How is it possible to change the Language of the Lexicon.
Say a Visitor wants to changes the language of the entire website by a language chooser from EN to DE.