gamecenter dialog language doesn't get localized - localization

I change the language of my device something different than English, but GameCenter dialogs still appear in English. I mean:
Sign in to Game Center
Use Existing Account
Create New Account
Cancel
Welcome back xxx!
etc...
Game Center app works perfectly in localized device language, but dialogs in my app is still in English.
I suppose those messages and menu texts should appear in device language? Am I wrong?
I can't find anything on Apple refs about this.
Is this happening beacuse I am in sandbox mode?
Or do I need to set GC language in the project?
I tried restarting device.

At last i found it. My assumption is wrong in the first place.
Gamecenter messages and menus are not affected by the device language but, by the xib's localization.
I just edited the xib file's folder which is localized in english by default.
renamed en.lproj >> xx.lproj (here xx is the local language code)
and readded files to the project.
All gamecenter messages and menus are in local language now.

Related

iOS - App description showing incorrect language in App Store

I localised my app via iTunesConnect but it does not show up in App Store. The primary language of my app is English.
When I go to Japanese App Store my app's description is still showing English while other apps show localised language.
In iTunesConnect, after I added a new version, I select Japanese on the top right, typed in Japanese app description, keywords and screenshots.
I also made sure that my phone language is Japanese.
What am I doing wrong?
This is a tricky one. It is not enough to just add localized description on AppStoreConnect. Apple shows Languages in this section according to the files localized in your app in Xcode.
Facebook example
Easy way to do this is to change "Localization native development region" field in Info.plist file:
Changing development region
IMPORTANT NOTICE: However, this solution is enough only if you don't localize any other files (solution for this is bellow, you must do some extra steps).
You need to open Xcode, select your project in files structure, select Project (not targets) and add the languages you want to be shown there (in your case Japanese). On the following image there are a couple of languages (don't check the "Use base internationalization" checkmark):
Localizations languages
IMPORTANT NOTICE: You must localize at least one file in your target in order to have this information about languages shown on the AppStore (as you are doing this on per target basis, you can have different languages shown for each target, good for white label apps). I usually localize LaunchScreen.storyboard as you usually don't have any text here.
In order to localize storyboard, you need to tap on it and in the right menu tap "Localize..." button:
Localize button
After that, just check the languages you want it to be localized to (in my example German.
Localized storyboard languages list
You may want to check again tomorrow. I found in the past that updates to international app store pages may take up to 24 hour to propagate.

iOS app not using the only localization available

Good morning,
I have an iOS app with English and Hebrew localizations and a device set on English.
I need to build the app with Hebrew only for this version (so the app will launch in Hebrew).
I tried to delete en.lproj and remove the references in Xcode, but the app just uses the base localization in the storyboard and the string I use as a parameter in NSLocalizedString, instead of the Hebrew files.
I've also tried to change the development language to Hebrew: How do I change the Development language in Xcode before internationalizing my app?
but that didn't help.
When setting NSUserDefaults-AppleLanguages key in main() it works but not on the first launch.
I would love to use a different implementation for NSLocalizedString so I could manage the localizations myself, but the problem is that English is written from left to right and Hebrew is from right to left, so updating the strings is not enough.
Do you have any idea how can I force the app to launch for every device in the localization that I choose?
Thanks!
I think that I found what was the problem, I left a single image localized in English.
It seems that when there is anything localized to a language, it adds the language to a list of supported languages. Because the device is in English and the app "supports" it, English will be used.
If anyone knows a way to modify this list of supported languages without deleting files, and making it work from the first launch, and maybe even having a different list for each target, please let me know!

Localization not working on device

I localized my app in french, created Localizable.strings with appropriate translations, as well for the storyboard.
When I run the app on the french device, storyboard labels are translated correctly, but not the ones coming from Localizable.strings.
I printed preferredLanguages() and NSLocaleLanguageCode and they are correct on the device ("fr").
If I force the language "fr" with the Edit Scheme, it works, but if I go back to "System Language", it does not work anymore.
Reading other posts, I also cleaned, delete app from device, reset content and settings on the simulator, relaunch Xcode, ...
I can't see why the app does not use the language defined on the device for the Localizable.Strings !
Thanks for your help...

Wrong language in Game Center Leaderboards/Achievements

The device language is Italian, when I open the Game Center from my app the titles "leaderboard" "achievement" are in Italian but the names and description of leaderboards and achievements are in English!!
I use this code to show it :
GameKitHelper *gkHelper = [GameKitHelper sharedGameKitHelper];
[gkHelper showLeaderboard];
If I open the Game Center directly from the app Game Center is everything in Italian.
Your app should follow the language settings that are set at a device level, not at an app level. You cant force game/app kit into another language, the user needs to change their language in the settings.
It seems that a running app caches the localised Leaderboard titles. If you leave the app running and switch languages, when you return to the app, the Leaderboard view uses the previous language's titles. I have 4 languages in my app so I noticed the pattern fairly quickly.
Sadly very few developers have bothered with translations of the Leaderboards. So the only app I could find was Zen Pinball for iPad, it confirmed this behaviour. I think this is an iOS bug but I'm not going to work around this as very few users would be inconvenienced.

UIDocumentInteractionController is great but how about the language setting?

I'm using the UIDocumentInteractionController for iPad and everything is fine, but how can I change the buttons or menus of UIDocumentInteractionController presentation to any other language? All are in English. For example I noticed that: on Apple's e-mail app, if there is a attached file and when I touch enough on it, it presents the necessary menu and buttons according to the locale language setting on the device.
I was having similar issue and after short discussion in devforum and one test project I found the problem.
In general Aplle's controllers respect localization of your app, so they are not displayed in device's language if the device language is not included in project's localization language list.
I had one other problem, that I edited project.pbxproj with aim to have my language as the development language (developmentRegion = English; to developmentRegion = Czech;). So I had Czech present on the list, but controllers were still in English. After changing the development region back and adding Czech to the list everything works just fine.
What I found out is the following:
In your info.plist when you set "Development Localization" to a specific language (i.e. "en"), then your UIDocumentInteractionController will present all text in this language.
When you remove "Development Localization" from Info.plist completely, then the UIDocumentInteractionController will present all text in the language you have set on your device.
I was building and Ionic Capacitor app, and on setup the "Development Localization" field in the Info.plist file was prefilled with the value "en". So i removed it. Hope this helps someone.

Resources