Loading...
 
Skip to main content

How to manage string localization in JS files


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

Aliases

Show PHP error messages