Documentation
Management
Translate Globalize .js files (formerly jquery-globalize)
Translate Globalize .js files with WebTranslateIt.
2 min read

What are Globalize .js files?
Globalize (formerly known as jquery-globalize) .js files are one of the language files used to localize Javascript applications. The file format is monolingual and contains pairs of keys and their translation.
WebTranslateIt is a software localization platform that can help localize Globalize .js files.
Globalize files come in 2 flavours:
Globalize “list”
js
$.localize("msgDateReq", "en", "Date is required.");
$.localize("msgSubjectReq", "en", "Customer is required.");
// a comment
$.localize("msgTargetReq", "en", "Institution is required.");
// with an escaped double quote!
$.localize("msgTargetReq2", "en", "Institution CODEBLOCK0 quot; required.");
$.localize("msgTargetReq3", "en", 'Institution CODEBLOCK0 #39; required.');
$.localize("msgTargetReq4", 'en', "Institution CODEBLOCK0 quot; required.");
$.localize("msgTargetReq5", 'en', 'Institution CODEBLOCK0 #39; required.');
$.localize('msgTargetReq6', "en", "Institution CODEBLOCK0 quot; required.");
$.localize('msgTargetReq7', "en", 'Institution CODEBLOCK0 #39; required.');
$.localize('msgTargetReq8', 'en', "Institution CODEBLOCK0 quot; required.");
$.localize('msgTargetReq9', 'en', 'Institution CODEBLOCK0 #39; required.');
Comments left in the file will be imported as instructions.
Magic Comments
This file handler support the following magic comments:
- Comments containing
[MAXCHAR=xx]will set a max character limit toxx. Example:// [MAXCHAR=20] - Comments containing
[LABEL=xxxx]will assign the label toxxxx. Example:// [LABEL=new feature]
Globalize “hash”
js
Globalize.addCultureInfo( "fr", {
messages: {
"translate": "traduire",
"hello": "bonjour",
'test1': 'teststr1',
'test2': "teststr2",
// comment
"test3": 'test CODEBLOCK1 #39;fdfd'
}
});
Comments left in the file will be imported as instructions.
Magic Comments
This file handler support the following magic comments:
- Comments containing
[MAXCHAR=xx]will set a max character limit toxx. Example:// [MAXCHAR=20] - Comments containing
[LABEL=xxxx]will assign the label toxxxx. Example:// [LABEL=new feature]