Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The locale function does not work for 'de-DE' #1393

Closed
MarioGruda opened this issue Sep 25, 2017 · 1 comment
Closed

The locale function does not work for 'de-DE' #1393

MarioGruda opened this issue Sep 25, 2017 · 1 comment
Labels

Comments

@MarioGruda
Copy link

MarioGruda commented Sep 25, 2017

// import it to change locale and load localization messages
import { locale, loadMessages } from 'devextreme/localization';

import 'devextreme-intl';

// Load localized messages (English included by default)
const messagesDe = require('devextreme/localization/messages/de.json');

loadMessages(messagesDe);

// Set locale according the browser language
locale(navigator.language);
// ------------------ navigator.language is in IE and EDGE de-DE. In Chrome 'de'

Steps to Reproduce:

  1. use locale(navigator.language); in IE or Edge with german languagesettings. navigator.language is 'de-DE' and does not work
  2. use locale('de') in IE or Edge. This works for me.

Results You Received:

localization works only for 'de' not for 'de-DE'

Results You Expected:

Should work for 'de-DE' and 'de'

Environment Details:

Devextreme 17.1.5
InternetExplorer and Edge

@artem-kurchenko
Copy link

Hi,
 
Thanks for the report. Currently, there is no built-in logic that determines a base locale for such cases. We'll research if it's possible to support this and make an update here.

@artem-kurchenko artem-kurchenko changed the title locale function does not work for 'de-DE' The locale function does not work for 'de-DE' Oct 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants