question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

this.get('intl').setLocale('en-us'); in addon

See original GitHub issue

Hi,

I managed to add ember-intl to my addon. If the application does not use ember-intl but uses my addon I like to set this.get(‘intl’).setLocale(‘en-us’) if locale is ‘’

Is there some Example or Doc on where and how I should do this.

Thanks

  • Martin

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jasonmitcommented, Jul 12, 2017

I would recommend not setting app state from within your addon (setting the app’s locale). I’d continue to recommend passing the locale attribute to each of the t helpers.

1reaction
broersecommented, Jul 12, 2017

Many thanks. Just tried and 2.29.1 solves it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

setlocale - Manual - PHP
en_US.utf8. POSIX I had to install a finnish language pack with "sudo apt-get install language-pack-fi-base" Now the output for "locale -a" is: C...
Read more >
Translations | Blockly - Google Developers
setLocale puts each key from the input object into Blockly.Msg . You can call it multiple times with distinct keys, but calling it...
Read more >
locale — Internationalization services — Python 3.11.1 ...
Exception raised when the locale passed to setlocale() is not recognized. ... Get a string with the name of the character encoding used...
Read more >
Storybook react-intl addon
This Storybook addon assumes your project is already set up with react-intl, and that it is properly configured and working.
Read more >
API GetLocale - WoWWiki - Fandom
Locales · "frFR": French (France) · "deDE": German (Germany) · "enGB": English (Great Britain) if returned, can substitute 'enUS' for consistancy · "enUS":...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found