easy_localization
easy_localization copied to clipboard
Extract or Export translation key from the code
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 no, this feature is not implemented. This idea is controversial, because in the final files we get a flattened json without a structure.
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