In my app I need user to pick a place using Google places. I call google place picker like so:
在我的应用中,我需要用户使用Google地方选择一个地方。我这样称为google place picker:
GMSPlacePicker * placePicker = [[GMSPlacePicker alloc] initWithConfig:config];
GMSPlacesClient * placesClient = [GMSPlacesClient sharedClient];
[placePicker pickPlaceWithCallback:^(GMSPlace *place, NSError *error) {...}];
My problem is, that presented picking View has English language set instead of my localized language (Slovak). I have read that it is supposed to find localization by itself?
我的问题是,提出的选择视图有英语语言设置而不是我的本地化语言(斯洛伐克语)。我已经读过它应该自己找到本地化?
1 个解决方案
#1
2
what i did was to changing the default language in my app info.plist
我做的是更改我的应用程序info.plist中的默认语言
Localization native development region to = "your language prefix goes here"
this changed my app localization and also changed the Google Place Picker to the the preferred language. my app also needs to be from left to right but my language is right to left so i also forced the app to "left to right" in my app delegate :
这改变了我的应用本地化,并将Google Place Picker更改为首选语言。我的应用程序也需要从左到右,但我的语言是从右到左,所以我也强迫应用程序在我的应用程序委托中“从左到右”:
UIView.appearance().semanticContentAttribute = UISemanticContentAttribute.forceLeftToRight
take for consideration "semanticContentAttribute" supported only from ios 9 and above.
考虑到仅从ios 9及更高版本支持的“semanticContentAttribute”。
i hope this helps anyone struggling with this issue.
我希望这可以帮助任何努力解决这个问题的人。
#1
2
what i did was to changing the default language in my app info.plist
我做的是更改我的应用程序info.plist中的默认语言
Localization native development region to = "your language prefix goes here"
this changed my app localization and also changed the Google Place Picker to the the preferred language. my app also needs to be from left to right but my language is right to left so i also forced the app to "left to right" in my app delegate :
这改变了我的应用本地化,并将Google Place Picker更改为首选语言。我的应用程序也需要从左到右,但我的语言是从右到左,所以我也强迫应用程序在我的应用程序委托中“从左到右”:
UIView.appearance().semanticContentAttribute = UISemanticContentAttribute.forceLeftToRight
take for consideration "semanticContentAttribute" supported only from ios 9 and above.
考虑到仅从ios 9及更高版本支持的“semanticContentAttribute”。
i hope this helps anyone struggling with this issue.
我希望这可以帮助任何努力解决这个问题的人。