How to manage string localization in JS files
Warning
All information for end users to be able to translate should be in a workspace on tiki.org
Tiki has a very simple system to localize strings in Javascript files.
A string in a JS file should be encapsulated with tr() function to be translatable. Then someone has to manually add this string to lang/xx/language.js to be able to translate it.
This page is to discuss how to improve the current system so that we can:
- Automatically collect translatable strings from JS files (presumably using
get_strings.php) - Integrate JS strings with PHP and Smarty strings to avoid translation duplication and use available tools like i18n.tiki.org and i18n.tiki.org/stats