【问题标题】:How add locale support to google_map_location_picker ? (Flutter)如何向 google_map_location_picker 添加语言环境支持? (扑)
【发布时间】:2020-03-06 22:38:15
【问题描述】:

如何在 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')
      ] 

但它不起作用。

【问题讨论】:

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


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2012-08-30
      • 2019-07-16
      • 1970-01-01
      • 1970-01-01
      • 2013-01-10
      • 2020-04-05
      • 1970-01-01
      相关资源
      最近更新 更多