Need help with jquery-localize?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

464 Stars 147 Forks 75 Commits 36 Opened issues


a jQuery plugin that makes it easy to internationalize your web site.

Services available


Need anything else?

Contributors list


Build Status

A jQuery plugin that makes it easy to i18n your static web site.


  • Lazily loads JSON translation files based on a simple naming convention.
  • By default, applies the translations to your document based on simple attribute convention.
  • Tested with jQuery versions 1.7.2, 1.8.3, 1.9.1, 1.10.2, 1.11.3, 2.0.3, 2.1.4

Getting Started

Download the production version or the development version.

Load the jquery-localize plugin on your page.

It's the file located at


Mark up tags whose content you want to be translated

Somewhere in your html:


Provide a JSON language file that has translations:


  "greeting": "Bonjour!"

Use the localize plugin.

Gory Details

Language file loading

The first argument of the localize method is the name of the language pack. You might have a different language pack for different parts of your website.

Here's an example of loading several language packs:

If the language of the browser were set to "fr", then the plugin would try to load:

  • header-fr.json
  • sidebar-fr.json
  • footer-fr.json

if the language of the browser also had a country code, like "fr-FR", then the plugin would ALSO try to load:

  • header-fr-FR.json
  • sidebar-fr-FR.json
  • footer-fr-FR.json

This let's you define partial language refinements for different regions. For instance, you can have the base language translation file for a language that translates 100 different phrases, and for countries were maybe a some of those phrases would be out of place, you can just provide a country-specific file with just those special phrases defined.

Skipping Languages (aka Optimizing for My Language)

This is useful if you've got a default language. For example, if all of your content is served in english, then you probably don't want the overhead of loading up unecessary (and probably non-existant) english langauge packs (foo-en.json)

You can tell the localize plugin to always skip certain languages using the skipLanguage option:

Applying the language file

If you rely on the default callback and use the "data-localize" attribute then the changes will be applied for you.



Tracker Pro XT Deluxe



Use at your own risk.


Bug List


application-es.json (fake spanish)

  "title": "Tracker Pro XT Deluxo",
  "search": {
    "placeholder": "Searcho...",
    "button": "Vamos!"
  "footer": {
    "disclaimer": "Bewaro."
  "menu": {
    "dashboard": "Dashboardo",
    "list": "Bug Listo",
    "logout": "Exito"

Localize it!


You can provide a callback if you want to augment or replace the default callback provided by the plugin. Your callback should take at least 1 argument: the language data (contents of your json file). It can optionally accept a second argument, which is a reference to the default callback function. This is handy if you still want the default behavior, but also need to do something else with the language data.

See the test/samples for working examples.


To contribute to this plugin, please read the contributing guidelines.

Credits & Licensing

Copyright (c) Jim Garvin (, 2008.

Dual licensed under the GPL ( and MIT ( licenses.

Written by Jim Garvin (@coderifous) for use on Please use it, and contribute changes.

Based off of Keith Wood's Localisation jQuery plugin.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.