easy_localization icon indicating copy to clipboard operation
easy_localization copied to clipboard

Extract or Export translation key from the code

Open Misikir opened this issue 3 years ago • 2 comments

Does this plugin have a way to extract keys from the source code? if the project is big taking each translation key from each file is a little harder.

One way to do this is using a script to iterator in all files and extract tr('Title') or 'Title'.tr() and create JSON file with key-value for each language.

Misikir avatar Mar 10 '21 09:03 Misikir

@Misikir no, this feature is not implemented. This idea is controversial, because in the final files we get a flattened json without a structure.

Overman775 avatar Mar 13 '21 20:03 Overman775

There is a VSC plugin tho that I created that does a pretty good job in combination with this package:

https://marketplace.visualstudio.com/items?itemName=iOSonntag.fluttereasylocalization

@bw-flagship Maybe add this to the pub.dev Info package it has 450 downloads already and does a great job on creating translations within the code editor. It helped some people already but it can do more then that.

Also see this issue for a video on the plugin: https://github.com/aissat/easy_localization/issues/630

iOSonntag avatar Jul 22 '24 16:07 iOSonntag