[dokuwiki] Proposal for translatable Javascript strings in plugins

  • From: "Gabriel Birke" <Gabriel.Birke@xxxxxxxxx>
  • To: <dokuwiki@xxxxxxxxxxxxx>
  • Date: Thu, 25 Oct 2007 13:40:53 +0200

Hello,

I would like to have translatable strings in the javascript of a plugin I am
currently developing (a color picker for the toolbar). I would propose the
following convention:

The directory pluginname/lang/langname can contain the optional file
"lang.js". Strings are stored like this:

LANG['plugins']['pluginname'] = {
        stringname1:translation, 
        stringname2:translation
}

The language file of the currently selected language will be loaded in the
function js_pluginscripts() in lib/exe/js.php. If the language file doesn't
exist, the function will default to english.

If you have any counter proposals or other ideas, let me know, otherwise I
will send a patch to the list shortly.

Greetings,

Gabriel

-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: