coderifous / jquery-localize

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

Load 3 data-localize json files #31

Closed ChrisFeldmeier closed 10 years ago

ChrisFeldmeier commented 10 years ago

$("[data-localize]") .localize("header") .localize("sidebar") .localize("footer")

The three json files are all loading correct to the browser. I have three json files which look's like this:

  1. header-en.json { "nav": { "assignmentchart": "Belegungsplan" } }
  2. sidebar-en.json { "sidebar": { "test": "test" } }
  3. footer-en.json { "footer": { "abc": "testtest" } }

All three json files should replaced with "data-localize". But only the FIRST!! (header-en.json) file will be replaced. The other HTML Tags with "data-localize" are empty. What do I am wrong ?

The jquery-localize description says, it should be worked in that order as I think.

best regards. Chris

coderifous commented 10 years ago

Hi Chris - I just did a quick test case to verify - and it did work for me. Can you post a gist or something that demonstrates the failure?

ChrisFeldmeier commented 10 years ago

How do you do that? It would be very nice if you can upload me your example with three json language files. thanks

coderifous commented 10 years ago

I added an example: c0781b40

ChrisFeldmeier commented 10 years ago

thanks.