gadicc / meteor-messageformat

MessageFormat i18n support for Meteor, with reactive templates
54 stars 22 forks source link

It's display 'en' on web although I set locale 'he' with msgfmt.setLocale('he') #263

Open roapham opened 7 years ago

roapham commented 7 years ago

Hi, I've got issue with translation which I can't understand. Please take a look at my configuration first. This is my config.js msgfmt.init('en', { sendPolicy: 'all', extractLogLevel: 'debug', logLevel: 'debug' }); if (Meteor.isClient){ msgfmt.setLocale('he'); }

and this is my mobile-config.js public": { "msgfmt": { "native": "he", "locales": [ "en", "he" ] } }

The app run on android and iphone quite good, it displays "he". But issue is when I try to run on web it's 'en'. There is something about msgfmt.timestamps, I don't know.

This is debug log: `debug: [msgfmt] [Q] Setting locale from header: en jag_pince.js?hash=cdfe0b7bfd95425f19d9f8e0f3eae02d38dd5ce1:181

debug: [msgfmt] [Q] setLocale en undefined jag_pince.js?hash=cdfe0b7bfd95425f19d9f8e0f3eae02d38dd5ce1:181

debug: [msgfmt] [Q] locale set to en jag_pince.js?hash=cdfe0b7bfd95425f19d9f8e0f3eae02d38dd5ce1:181

debug: [msgfmt] [Q] fetchLocale request for "all", url: http://localhost:3000/msgfmt/locale/all/0 jag_pince.js?hash=cdfe0b7bfd95425f19d9f8e0f3eae02d38dd5ce1:181

debug: [msgfmt] [Q] fetchLocale arrived 346ms after request jag_pince.js?hash=cdfe0b7bfd95425f19d9f8e0f3eae02d38dd5ce1:181

debug: [msgfmt] [Q] locale set to en jag_pince.js?hash=cdfe0b7bfd95425f19d9f8e0f3eae02d38dd5ce1:181

debug: [msgfmt] clientInit, 623ms after script loading jag_pince.js?hash=cdfe0b7bfd95425f19d9f8e0f3eae02d38dd5ce1:181

debug: [msgfmt] setLocale (already loading) en undefined jag_pince.js?hash=cdfe0b7bfd95425f19d9f8e0f3eae02d38dd5ce1:181

debug: [msgfmt] Meteor.startup(), 858ms after script loading`

Please help.