Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

It is invalid to switch traditional languages #169

Closed
CorkiiOS opened this issue Feb 18, 2020 · 2 comments · Fixed by #173
Closed

It is invalid to switch traditional languages #169

CorkiiOS opened this issue Feb 18, 2020 · 2 comments · Fixed by #173

Comments

@CorkiiOS
Copy link

  • (void)mapView:(MGLMapView *)mapView didFinishLoadingStyle:(MGLStyle *)style {
    [style localizeLabelsIntoLocale:nil];
    }

I find that other languages can be switched, so why can't traditional languages be switched.

@1ec5 1ec5 transferred this issue from mapbox/ios-sdk-examples Feb 18, 2020
@1ec5
Copy link
Contributor

1ec5 commented Feb 18, 2020

Hi @CorkiiOS, thanks for reporting this issue. A few questions to help us understand what you’re experiencing:

  • What version of the map SDK are you using?
  • What is the preferred language in Settings?
  • What language is your application running in? (This may differ from the preferred language, based on the localizations your application provides.)
  • What happens when you call -localizeLabelsIntoLocale: this way? Does your application crash, or do the labels remain in the wrong language?

Note that a locale of nil should cause the map’s labels to appear in the user’s preferred language in Settings. A locale of [NSLocale localeWithIdentifier:@"mul"] would cause each label to appear in the locally appropriate language (for example, French labels in France but German labels in Germany). Is this not what you’re seeing?

@CorkiiOS
Copy link
Author

version 5.5.0
The preferred language is traditional Chinese
The application runtime language is traditional

My steps:
1.Switch to English
2.Switch to traditional Chinese
Then the map shows English

My code:
(void)mapView:(MGLMapView *)mapView didFinishLoadingStyle:(MGLStyle *)style {
[style localizeLabelsIntoLocale:nil];
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants