1

I would like to force a language for angular i18n.

Currently it's using the browser locale, but I would like to be able to force another language (in the case the user account language is set to English and the browser is in Spanish, for example).

I tried injecting $locale in my main controller and doing $locale.id = 'en-us' but it doesn't change anything. I expect the date, number and currency filters to change output format, but nothing.

How can I do that?

Samuel Bolduc
  • 18,163
  • 7
  • 34
  • 55
  • Possible duplicate of [Angularjs and $locale](https://stackoverflow.com/questions/13007430/angularjs-and-locale) – Caramiriel Sep 20 '17 at 10:11

1 Answers1

1

Already answered here:

Angularjs and $locale

It seems you need to only include the relevant language file.

Community
  • 1
  • 1
emilecantin
  • 286
  • 3
  • 9