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开发者_JAVA技巧, 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.
精彩评论