localizely / flutter-intl-intellij

This Android Studio & IntelliJ plugin generates boilerplate code for localization of Flutter apps with official Dart Intl library
MIT License
129 stars 4 forks source link

Could not generate .arb when pressed save shortcut key. #91

Closed parcool closed 2 years ago

parcool commented 2 years ago

https://user-images.githubusercontent.com/12092478/203259354-06696170-45fc-447d-920f-1845ac3d9533.mp4

parcool commented 2 years ago

https://user-images.githubusercontent.com/12092478/203259848-974f75f6-853d-4d86-a93e-05f34e8606cb.mp4

I upload the video because My english is poor so I can't say that clearly.

lzoran commented 2 years ago

Hi @parcool,

The Flutter Intl plugin does not generate ARB files. It uses them as a source for generating dart localization files (files in lib/generated/ folder). Also, in case your base language in the app is Chinese (zh_CN), you can set that in the flutter_intl config in the pubspec.yaml file and Flutter Intl plugin will use it as the main language during generation.

The pubspec.yaml file:

flutter_intl:
  enabled: true
  main_locale: zh_CN # Optional. Sets the main locale used for generating localization files. Provided value should comply with ISO-639-1 and ISO-3166-1 (e.g. "en", "en_GB"). Default: en

Hope it helped!

parcool commented 2 years ago

@lzoran thanks so much. It works. you saved my life.