Yandex MapKit 设置标签的语言环境

Yandex MapKit set locale of labels

如何在 mapkit 中设置标签语言环境?

MapKit 不对文本标记使用默认本地化

 mapView.getMap()

不包含合适的方法

我终于做到了

文档: i18ManagerFactory

@Override
public void onStart() {
    super.onStart();
    mapView.onStart();
    MapKitFactory.getInstance().onStart();
    .....
    I18nManagerFactory.setLocale(Locale.getDefault().getLanguage(), new LocaleUpdateListener() {
        @Override
        public void onLocaleUpdated() {
            Log.d(TAG","onLocaleUpdated");
        }

        @Override
        public void onLocaleUpdateError(@NonNull Error error) {
            Log.d(TAG,"onLocaleUpdateError");
        }
    });
}

注意:国家和语言设置由系统首选项决定。并且用户需要重新启动应用程序才能使更改生效。