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.

set does not update the $locale.id

See original GitHub issue

When changing locale from ‘en’ to ‘fr’ the $locale.id property is still set to to ‘en’

var locale = _.find(locales, function (l){ return l.countryCode === countryCode}); if (locale) { tmhDynamicLocale.set(locale.id); } else { console.log("localeId not found using countryCode: " + countryCode); }

The numberFormat property has the current settings but not the id. Using version 1.2.28 / angular 1.2.26 (can’t upgrade angular at this time)

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
lgalfasocommented, May 5, 2016

The $locale object and all its properties are updated in-place (whenever possible).

1reaction
lgalfasocommented, May 5, 2016

the $locale object is not updated synchronously. There are several mechanism to know when tmhDynamicLocale updates the locale, in this case, the simplest would be to use the fact that tmhDynamicLocale.set returns a promise that is fulfilled when the locale changes. With this in mind, here is an updated version that takes this into consideration http://plnkr.co/edit/EdzfoUYWiQExjebDPEQc?p=preview

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I fix my locale issue?
First run locale to list what locales currently defined for the current user account: $ locale LANG=C LANGUAGE= LC_CTYPE=fi_FI.
Read more >
the locale id '0' of the source column 'PAT_NUM_ADT' and ...
In this case, all I needed to do was update my select statement as follows: SELECT CONVERT(VARCHAR(3),NULL) AS ColumnName... This worked perfectly and...
Read more >
Error: The locale id of the source column and ...
Symptoms Executing a staging area table results in an error message. Error Message The locale id '####' of the source column...
Read more >
i18n IVY - Next.12 LocaleID not set · Issue #15896
I'm pretty sure the locale is supposed to be set in angular.json, so you can have different build configurations for i18n language versions....
Read more >
How to solve “The Locale ID 9 is not installed on this ...
Solution : ; Step 1: Go to the Project Properties as shown below. ; Step 2: In the Configuration Properties check if the...
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