0

I got an offline js app. Now my customers wants me to translate it into another language.

My plan is to use i18next but it requires a JSON file. When I check it in Firebug it does a GET request.

We have to keep it offline no matter what... Can I use i18next offline without a web-server on all common browsers?

Thanks

This is i18n

AME
  • 2,092
  • 5
  • 17
  • 36
  • *runs in browser, under node.js, rhino and other javascript runtimes.* – Álvaro González May 07 '14 at 12:24
  • @ÁlvaroG.Vicario Yea I'm just not sure because it did a get request, are you 100% sure that I can run it offline? – AME May 07 '14 at 12:26
  • Your description suggests you have tested the library though a web server. Under those conditions, there's no other way it can fetch files than HTTP. Why don't you test it in your real target environment? – Álvaro González May 07 '14 at 12:29
  • 1
    You can run without webserver but some browser dosenot loads the JSON in file protocol, it needs http protocol for Ajax – powercoder23 May 07 '14 at 12:31
  • @powercoder23 Thanks for the tip, do you know which browsers? – AME May 07 '14 at 12:50
  • I'm willing to accept your comment as an answer @powercoder23, since your post lead me in the right direction. – AME May 07 '14 at 13:09

2 Answers2

1

Yes it works. On Firefox it works as default.

on Chrome you have to start it like in this post

Community
  • 1
  • 1
AME
  • 2,092
  • 5
  • 17
  • 36
0

Sure, it works. Just add the json file in the cache manifest, and the browser will have in in the application cache.