I've added the i18next library to do some i18n stuff. Here's my init function.
- i18n.init({
- lng: 'en',
- useCookie: false,
- fallbackLng: 'en',
- ns: 'resource',
- getAsync: false,
- resGetPath: './exo/locales/__lng__/__ns__.json'
- }, function(t) {
- });
The i18next library will make an ajax call to http://<server>/exo/locales/en/resource.json. Everything works great!
But, I get the following error when I try to build the production files using Steal.
-
failed to open file file:////Users/ecarino/p4depot/EricsMacBookAir_ManhattanClient/web/steal/rhino/exo/locales/en/resource.json JavaException: java.io.FileNotFoundException: /Users/ecarino/p4depot/EricsMacBookAir_ManhattanClient/web/steal/rhino/exo/locales/en/resource.json (No such file or directory)
Any ideas? I found this stackoverflow article on the same exact issue. Their solution is to modify the url path to be an absolute url, or to add a check of "steal.isRhino" on all ajax calls. I have verified those work, but those aren't elegant solutions.
What should I do?