coderifous / jquery-localize

a jQuery plugin that makes it easy to internationalize your web site.
465 stars 142 forks source link

Localize parameters #58

Closed oskrabanek closed 9 years ago

oskrabanek commented 9 years ago

As a developer I would appreciate if the plugin could use parameters so that I don't have to localize any strings with eg. numbers or other constant strings. In most cases it can be solved by separately localized "span" tags, but in particular cases such as "option" tags you can't. In this case localizing separately each string just because it differs only in the number is waste of space and developers time (not to mention it isn't very elegant).

Example:

Localized JSON { my_option: "My option {0}.{1}" }

HTML: