[rt-devel] JQuery Date and Time picker translations

Christian Loos cloos at netsandbox.de
Mon Apr 8 11:40:35 EDT 2013


Hi RT Developer,

I already opened an bug for this which is linked to RT 4.2.0 release:
http://issues.bestpractical.com/Ticket/Display.html?id=22133

I currently try to implement this for our RT 4.0.10 installation and I'm
not sure what would be the best way for this:

1. find out the user language and load only the language specific JavaScript

2. load all localization JavaScript (add them to @JSFiles in config) and
set the datepicker and timepicker regional attribute to the user language

3. concatenate all localization JavaScript in one file, add it to
@JSFiles in config and set the datepicker and timepicker regional
attribute to the user language


I started with 1. using RT->AddJavaScript but ended up with the same
localization file load multiple times as AddJavaScript don't check if
@JSFile already contains this file.
So I load the localization file with a script element in
/Elements/HeaderJavascript. The pro is that only the used localization
JavaScript is transmitted to the client. The con is that this file isn't
squished.

With 2. the pro is we simply can add the files to @JSFiles in config and
the files will be squished. The con is that we have to modify the files
as the original files set the datepicker and timepicker regional attribute.

With 3. the pro is we only have to add one file to @JSFiles in config
and this one will be squished. The con is that we have to concatenate
the files and also have to remove the datepicker and timepicker regional
attribute setting as with 2.


Chris


More information about the rt-devel mailing list