Feature #1108
[PATCH] Added support for Javascript localization
| Status : | Rejected | Start : | ||
| Priority : | Normal | Due date : | ||
| Assigned to : | scott - | % Done : | 0% |
|
| Category : | frontend | |||
| Target version : | Maybe Someday | |||
| Resolution : | wontfix |
Description
This patch adds some support for Javascript localization, by means of the same Localization plugin and the same translation file. One should only create entries in the translation file with a 'js_' prefix, like this:
l.store 'js_hours', 'ore'
and then, provided there's an HTML reference to the Javascript in /articles/localized_js (like I've provided in the attached patch for the default.rhtml of the default theme), one can localize strings in Javascript like this:
document.write( 'Hello!'.localize() );
