Feature #1108

[PATCH] Added support for Javascript localization

Added by alxx - 575 days ago. Updated 133 days ago.

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() );

js_localization_patch.diff (2.4 KB) alxx -, 05/06/2007 11:04 AM

History

07/22/2008 01:55 AM - neuro -

  • Status changed from New to Rejected
  • Resolution set to wontfix

Eric Daspet submitted a Javascript localization tool that has been added into 5.1.

Also available in: Atom PDF