LocalizationHelper constructor
LocalizationHelper(
- String pathMorphemeyaml
Implementation
LocalizationHelper(String pathMorphemeyaml) {
final keyLocalization = 'localization';
final keyArbDir = 'arb_dir';
final keyTemplateArbFile = 'template_arb_file';
final keyOutputLocalizationFile = 'output_localization_file';
final keyOutputClass = 'output_class';
final keyOutputDir = 'output_dir';
final keyReplace = 'replace';
final yaml = YamlHelper.loadFileYaml(pathMorphemeyaml);
final Map<dynamic, dynamic> localization = yaml[keyLocalization];
_abrDir =
localization[keyArbDir]?.toString().replaceAll('/', separator) ?? '';
_templateArbFile = localization[keyTemplateArbFile] ?? '';
_outputLocalizationFile = localization[keyOutputLocalizationFile] ?? '';
_outputClass = localization[keyOutputClass] ?? '';
_outputDir =
localization[keyOutputDir]?.toString().replaceAll('/', separator) ?? '';
_replace = localization[keyReplace] == true;
}