This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var message = "Good day, $1"; | |
$.i18n(message, 'Joe'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var message = "Found $1 {{PLURAL:$1|result|results}}"; | |
$.i18n(message, 1); | |
var message = "$1 changed {{GENDER:$2|his|her}} profile picture"; | |
$.i18n(message, 'Emma', 'female'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.i18n({ | |
locale: 'de' | |
}); | |
// or | |
$.i18n().locale = 'de'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="en" dir="ltr"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.i18n( { | |
locale: 'en' | |
} ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.i18n().load({ | |
en: 'i18n/en.json' | |
}).done( function() { console.log('done!') } ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.i18n().load({ | |
en: 'i18n/en.json' | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@metadata": { }, | |
"en": { | |
"appname-title": "Example Application" | |
}, | |
"ru": { | |
"appname-title": "Демонстрационное приложение" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@metadata": { | |
"authors": [ | |
"Me" | |
], | |
"last-updated": "2016-09-21", | |
"locale": "en", | |
"message-documentation": "qqq" | |
}, | |
"appname-title": "Example Application", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone https://github.com/wikimedia/jquery.i18n.git | |
$ cd jquery.i18n | |
$ git submodule update --init |