如何在google_map_location_picker中添加语言环境支持? (扑)

时间:2019-11-11 08:41:15

标签: google-maps flutter localization google-maps-android-api-2 flutter-dependencies

如何在Flutter google_map_location_picker插件中添加对“ ru”和“ kz”语言环境的支持?我尝试过了

MaterialApp(
      localizationsDelegates: [
        // ... app-specific localization delegate[s] here
        location_picker.S.delegate,
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
        GlobalCupertinoLocalizations.delegate,
      ],
      locale: const Locale('ru'),
      supportedLocales: [
        const Locale('ru'),
        const Locale('en'),
        const Locale('kz')
      ] 

但是它不起作用。

1 个答案:

答案 0 :(得分:0)

如果它在iOS上不起作用,则将以下行添加到您的Info.plist文件中可能会有所帮助。

<key>CFBundleLocalizations</key>
<array>
    <string>ru</string>
    <string>en</string>
    <string>kz</string>
</array>