Google Places API for IOS 没有设置本地化语言

Google Places API for IOS does not set localized language

在我的应用程序中,我需要用户使用 Google 个位置来选择一个位置。我这样调用 google 地点选择器:

GMSPlacePicker * placePicker = [[GMSPlacePicker alloc] initWithConfig:config];

GMSPlacesClient * placesClient = [GMSPlacesClient sharedClient]; 

[placePicker pickPlaceWithCallback:^(GMSPlace *place, NSError *error) {...}];

我的问题是,呈现的选择视图设置的是英语,而不是我的本地化语言(斯洛伐克语)。我读过它应该自己找到本地化?

我所做的是更改我的应用程序中的默认语言 info.plist

Localization native development region to = "your language prefix goes here"

这改变了我的应用程序本地化,也将 Google 地点选择器更改为首选语言。 我的应用程序也需要从左到右,但我的语言是从右到左,所以我也强制应用程序 "left to right" 在我的应用委托中:

UIView.appearance().semanticContentAttribute = UISemanticContentAttribute.forceLeftToRight

考虑 "semanticContentAttribute" 仅支持 ios 9 及更高版本。

我希望这可以帮助任何正在努力解决这个问题的人。