[dokuwiki] Re: Localizing Javascripts

  • From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Fri, 26 Jan 2007 14:16:11 +0100

On Fri, 26 Jan 2007 13:24:18 +0100
"Gabriel Birke" <Gabriel.Birke@xxxxxxxxx> wrote:

> Hello!
> 
> I have extended my template with the following functionality: when I
> click on a search result, the result page gets scrolled to the first
> search term and at the bottom of the page there is a "jump to
> next/previous term" bar.
> 
> I will publish the code to the list, but before I do that I would
> like to know if there is an easy method in DokuWiki to localize
> JavaScript strings: The "search bar" at the bottom of the page is
> generated via JavaScript.

For the core you can use $lang['js']['mystring'] = 'foo'; and which
will be available in javascript in a global lang['mystring'] - I'm not
sure if it works for plugins as well. For templates we don't have a
localization mechanism currently.

Andi

-- 
http://www.splitbrain.org

Other related posts: