Ember: How to destroy and recreate service object

Hi Guys,

I was working on language switching feature for internationalization, i’m using ember-i18n library. i need some idea or some understanding to solve the issue which i’m currently facing

The problem is: ember-i18n Locale object is not destroyed whenever i’m switching the languages due to this the old translation was received even there is a language switch.

Please provide some details to solve this language switch issue. @jamesarosen

The folks who made ember-i18n joined forces with the folks working on ember-intl and standardized on that as the single best supported package going forward. So you will have more active support if you ask about GitHub - ember-intl/ember-intl: Localization library for any Ember Application or Addon.

There is a migration tool for switching from ember-i18n.

As far as I know, ember-intl supports switching the language on the fly and you shouldn’t need to do anything special.

Thanks for your quick reply @ef4. i will see the possibility to migrate it but there are more package we have to migrate apart from ember-i18n. so it will take sometime to migrate it over ember-intl.

I was further dig into the code and identified few interesting things, like propertyDidChange invoke the iterDeps method and DID_SEEN property is not cleared so the computed property is not recomputed. i believe if we have can clear DID_SEEN we might achieve this functionality.