All Projects → i18next → Jquery I18next

i18next / Jquery I18next

Licence: mit
i18next plugin for jquery usage

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Jquery I18next

Pseudo Localization
Dynamic pseudo-localization in the browser and nodejs
Stars: ✭ 109 (-23.78%)
Mutual labels:  translation, i18n, internationalization
Traduora
Ever® Traduora - Open-Source Translation Management Platform
Stars: ✭ 1,580 (+1004.9%)
Mutual labels:  translation, internationalization, i18n
Fluent.js
JavaScript implementation of Project Fluent
Stars: ✭ 622 (+334.97%)
Mutual labels:  translation, i18n, internationalization
React Localize Redux
Dead simple localization for your React components
Stars: ✭ 384 (+168.53%)
Mutual labels:  translation, i18n, internationalization
Dom I18n
Provides a very basic HTML multilingual support using JavaScript
Stars: ✭ 125 (-12.59%)
Mutual labels:  translation, i18n, internationalization
Easy localization
Easy and Fast internationalizing your Flutter Apps
Stars: ✭ 407 (+184.62%)
Mutual labels:  translation, i18n, internationalization
Phabricator zh hans
Phabricator zh-Hans Translation & Tools.
Stars: ✭ 113 (-20.98%)
Mutual labels:  translation, i18n, internationalization
Js Lingui
🌍📖 A readable, automated, and optimized (5 kb) internationalization for JavaScript
Stars: ✭ 3,249 (+2172.03%)
Mutual labels:  translation, i18n, internationalization
Django Rosetta
Rosetta is a Django application that eases the translation process of your Django projects
Stars: ✭ 806 (+463.64%)
Mutual labels:  translation, i18n, internationalization
Frenchkiss.js
The blazing fast lightweight internationalization (i18n) module for javascript
Stars: ✭ 776 (+442.66%)
Mutual labels:  translation, i18n, internationalization
Eslint Plugin I18n Json
Fully extendable eslint plugin for JSON i18n translation files.
Stars: ✭ 101 (-29.37%)
Mutual labels:  translation, i18n, internationalization
React Intl Hooks
React hooks for internationalization without the hassle ⚛️🌍
Stars: ✭ 64 (-55.24%)
Mutual labels:  translation, i18n, internationalization
Spree i18n
I18n translation files for Spree Commerce.
Stars: ✭ 338 (+136.36%)
Mutual labels:  translation, i18n, internationalization
Gettext
PHP library to collect and manipulate gettext (.po, .mo, .php, .json, etc)
Stars: ✭ 578 (+304.2%)
Mutual labels:  translation, i18n, internationalization
Gotext
Go (Golang) GNU gettext utilities package
Stars: ✭ 292 (+104.2%)
Mutual labels:  translation, i18n, internationalization
I18next
i18next: learn once - translate everywhere
Stars: ✭ 5,971 (+4075.52%)
Mutual labels:  translation, i18n, internationalization
Mojito
An automation platform that enables continuous localization.
Stars: ✭ 256 (+79.02%)
Mutual labels:  translation, i18n, internationalization
Eo Locale
🌏Internationalize js apps 👔Elegant lightweight library based on Internationalization API
Stars: ✭ 290 (+102.8%)
Mutual labels:  translation, i18n, internationalization
React I18next
Internationalization for react done right. Using the i18next i18n ecosystem.
Stars: ✭ 6,942 (+4754.55%)
Mutual labels:  translation, i18n, internationalization
Translatedjs
Internationalization and localization for JavaScript and Node.js
Stars: ✭ 17 (-88.11%)
Mutual labels:  translation, i18n, internationalization

Introduction

Source can be loaded via npm, bower or downloaded from this repo.


NEWS: localization as a service - locize.com

Needing a translation management? Want to edit your translations with an InContext Editor? Use the orginal provided to you by the maintainers of i18next!

locize

With using locize you directly support the future of i18next and react-i18next.


If you don't use a module loader it will be added to window.jqueryI18next

# npm package
$ npm install jquery-i18next

# bower
$ bower install jquery-i18next

Simplifies i18next usage in projects built based on jquery, like:

page source:

<ul class="nav">
  <li><a href="#" data-i18n="nav.home"></a></li>
  <li><a href="#" data-i18n="nav.page1"></a></li>
  <li><a href="#" data-i18n="nav.page2"></a></li>
</ul>

loaded resource file (locales/en/translation.json):

{
  "nav": {
    "home": "Home",
    "page1": "Page One",
    "page2": "Page Two"
  }
}

javascript code:

$(".nav").localize();

// results in
// <ul class="nav">
//  <li><a  data-i18n="nav.home">Home</a></li>
//  <li><a  data-i18n="nav.page1">Page One</a></li>
//  <li><a  data-i18n="nav.page2">Page Two</a></li>
// </ul>

Initialize the plugin

jqueryI18next.init(i18nextInstance, $, {
  tName: 't', // --> appends $.t = i18next.t
  i18nName: 'i18n', // --> appends $.i18n = i18next
  handleName: 'localize', // --> appends $(selector).localize(opts);
  selectorAttr: 'data-i18n', // selector for translating elements
  targetAttr: 'i18n-target', // data-() attribute to grab target element to translate (if different than itself)
  optionsAttr: 'i18n-options', // data-() attribute that contains options, will load/set if useOptionsAttr = true
  useOptionsAttr: false, // see optionsAttr
  parseDefaultValueFromContent: true // parses default values from content ele.val or ele.text
});

using options in translation function

<a id="btn1" href="#" data-i18n="myKey"></a>
$("#btn1").localize(options);

or

<a id="btn1" href="#" data-i18n="myKey" data-i18n-options='{ "a": "b" }'></a>
$("#btn1").localize();

data-i18n-options attribute must be a valid JSON object.

usage of selector function

translate an element

<a id="btn1" href="#" data-i18n="myKey"></a>
$("#btn1").localize(options);

myKey: same key as used in i18next (optionally with namespaces) options: same options as supported in i18next.t

translate children of an element

<ul class="nav">
  <li><a href="#" data-i18n="nav.home"></a></li>
  <li><a href="#" data-i18n="nav.page1"></a></li>
  <li><a href="#" data-i18n="nav.page2"></a></li>
</ul>
$(".nav").localize();

translate some inner element

<div class="outer" data-i18n="ns:key" data-i18n-target=".inner">
  <input class="inner" type="text"></input>
</div>
$(".outer").localize();

set different attribute

<a id="btn1" href="#" data-i18n="[title]key.for.title"></a>
$("#btn1").localize();

set multiple attributes

<a id="btn1" href="#" data-i18n="[title]key.for.title;myNamespace:key.for.text"></a>
$("#btn1").localize();

set innerHtml attributes

<a id="btn1" href="#" data-i18n="[html]key.for.title"></a>
$("#btn1").localize();

prepend content

<a id="btn1" href="#" data-i18n="[prepend]key.for.title">insert before me, please!</a>
$("#btn1").localize();

append content

<a id="btn1" href="#" data-i18n="[append]key.for.title">append after me, please!</a>
$("#btn1").localize();

set data

<a id="btn1" href="#" data-i18n="[data-someDataAttribute]key.for.content"></a>
$("#btn1").localize();

Gold Sponsors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].