Skip to content

Instantly share code, notes, and snippets.

🐱
I are serious. You now step into my profile.

Ilya Bodrov-Krukowski bodrovis

🐱
I are serious. You now step into my profile.
Block or report user

Report or block bodrovis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View main-jquery_i18n.js
$('.lang-switch').click(function(e) {
e.preventDefault();
$.i18n().locale = $(this).data('locale');
update_texts();
});
View demo.json
{
"@metadata": { },
"en": {
"appname-title": "Example Application"
},
"ru": "ru.yml"
}
View demo.js
$.i18n().load({
'en': {
'appname-title': 'Example Application'
},
'ru' : {
'appname-title': 'Демонстрационное приложение'
}
});
View demo.html
<li data-i18n="message-key">Fallback text</li>
View demo.js
var message = "Good day, $1";
$.i18n(message, 'Joe');
View demo.js
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');
View demo.js
$.i18n({
locale: 'de'
});
// or
$.i18n().locale = 'de';
View demo.html
<html lang="en" dir="ltr">
View demo.js
$.i18n( {
locale: 'en'
} );
View demo.js
$.i18n().load({
en: 'i18n/en.json'
}).done( function() { console.log('done!') } );
You can’t perform that action at this time.