lundi 25 avril 2016

Ember-i18n location fallback

I am trying to introduce ember-i18n into my current project to manage translations across different varieties of english. Specifically, aiming to handle en-US & general en words. The issue I am having is that even if I specify the i18n.locale to be en-US it still uses the translations form the en/translations.js file. This is happening even if the defaultLocale is set to en-US in the config/environment.js

I have specified two translation files:

locales/
├── en
│   └── translations.js
└── en-US
    └── translations.js

with the following contents:

app/locales/en/translations.js

export default {                                                                                                                                                                                                                                                                                                              
  app_name: 'Jobber',                                                                                                                                                                                                                                                                                                         

  cheque: 'Cheque',                                                                                                                                                                                                                                                                                                           
  province: 'Province',                                                                                                                                                                                                                                                                                                       
  postalCode: 'Postal Code',                                                                                                                                                                                                                                                                                                  

  // LINKS                                                                                                                                                                                                                                                                                                                    
  terms_of_service_link: 'http://ift.tt/23X3nLv',                                                                                                                                                                                                                                                           
  privacy_policy_link: 'http://ift.tt/1T0OgW4',                                                                                                                                                                                                                                                               
  reset_password_link: 'http://ift.tt/1RHEcTq',                                                                                                                                                                                                                                                    
};

app/locales/en-US/translations.js

export default {                                                                                                                                                                                                                                                                                                              
  cheque: 'Check',                                                                                                                                                                                                                                                                                                            
  province: 'State',                                                                                                                                                                                                                                                                                                          
  postalCode: 'Zip Code',                                                                                                                                                                                                                                                                                                     
};    

Any ideas why the I can't get the location fallback to work as intended?

references:

Ember-i18n Wiki - Location Fallback




Aucun commentaire:

Enregistrer un commentaire