multi-languages - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: FAQ and Guides (https://moodeaudio.org/forum/forumdisplay.php?fid=9) +--- Thread: multi-languages (/showthread.php?tid=5581) Pages:
1
2
|
multi-languages - Phil35 - 05-12-2023 Hi Tim, Is there a project to have moode in multi-languages? Is so I can help to translate in french. Kind regards Phil RE: multi-languages - Tim Curtis - 05-12-2023 Thanks for the offer :-) but although "multi-language" is somewhere on the TODO list there hasn't been a dev to take on the substantial work effort to create and maintain a language string database and modify the code base to use it. RE: multi-languages - Nutul - 05-12-2023 (05-12-2023, 12:15 PM)Tim Curtis Wrote: Thanks for the offer :-) but although "multi-language" is somewhere on the TODO list there hasn't been a dev to take on the substantial work effort to create and maintain a language string database and modify the code base to use it. It would be an interesting task... In the past I have done a dynamic dictionary which could change the language without requesting the page again, but: 1. it requires the language strings to be retrieved first 2. it needs all the "translatable" elements, no matter what they are, to have an attribute with which to determine the relevant text to be assigned. Then it was a matter of something (simplifying...) like the following Code: document.querySelectorAll('[dictId]').forEach((item) => { RE: multi-languages - Tim Curtis - 05-12-2023 Right. Some sort of key:value table https://github.com/dakk/jquery-multilang RE: multi-languages - bitlab - 05-12-2023 See earlier thread https://moodeaudio.org/forum/showthread.php?tid=2692&highlight=I18n RE: multi-languages - Tim Curtis - 05-12-2023 (05-12-2023, 03:34 PM)bitlab Wrote: See earlier thread https://moodeaudio.org/forum/showthread.php?tid=2692&highlight=I18n Good memory :-) RE: multi-languages - Nutul - 05-12-2023 (05-12-2023, 03:52 PM)Tim Curtis Wrote:(05-12-2023, 03:34 PM)bitlab Wrote: See earlier thread https://moodeaudio.org/forum/showthread.php?tid=2692&highlight=I18n A good tool, probably, but overkill... the whole thing can be done in less than 10 (ten) lines of code. By domain... And 1 JSON file per language, which, IMO, is better for maintenance and growth. Nevertheless, I can take the job over my shoulders (the biggest part being adding the attribute to every translatable item...), and contribute in Italian (native), and eventually in Spanish (30+ years speaking) and Bulgarian (15+ years speaking) if no natives are to be found in our happy community :-) P.S. Don't expect it to be done in one month... but in two or three should be feasible, with at least one translation included (guess which...) RE: multi-languages - bitlab - 05-12-2023 I18n also support one single file or single file per language. Don't forget that not all stuff for is in html/js or html templates, but also in php. Especially the configuration stuff. Also there is difference between translation of static vs dynamics items. Normally I use the i18n stuff, because it is supported in multiple source code environments. And provide tooling for scanning the code to generate the translation files or check for missing translations, provide good support for plurals, language fallback, strings with variables etc. Don't think too lightly about good localisation solution. RE: multi-languages - Tim Curtis - 05-12-2023 Yes, the i18n framework should be used. It would be best to test this out with just a single PHP template/script and a single modal screen/JS to get a feel for how things work and whether there are any side effects for example broken layout of elements on the page due to longer text strings, slower loading, etc. RE: multi-languages - reiou - 11-04-2023 I'd like to offer to contribute Japanese (speaker 15+ years, friends/family native). Please let me know when/how I can start. |