diff --git a/lib/ui/process_ui/widgets/textbox_control.dart b/lib/ui/process_ui/widgets/textbox_control.dart index 107fb71d..04d60a9a 100644 --- a/lib/ui/process_ui/widgets/textbox_control.dart +++ b/lib/ui/process_ui/widgets/textbox_control.dart @@ -130,7 +130,7 @@ class _TextBoxControlState extends State MediaQuery.of(context).orientation == Orientation.portrait; List choosenLang = globalProvider.chosenLang; if (!(widget.e.type == "simpleType")) { - choosenLang = ["English"]; + choosenLang = [choosenLang[0]]; } Map tranliterationLangMapper = { "eng": "Latin", @@ -215,19 +215,16 @@ class _TextBoxControlState extends State return null; } else if (!widget.validation.hasMatch(value)) { return AppLocalizations.of(context)! - .demographicsScreenInvalidMessage( - globalProvider.selectedLanguage); + .demographicsScreenInvalidMessage(lang); } } if (value == null || value.isEmpty) { return AppLocalizations.of(context)! - .demographicsScreenEmptyMessage( - globalProvider.selectedLanguage); + .demographicsScreenEmptyMessage(lang); } if (!widget.validation.hasMatch(value)) { return AppLocalizations.of(context)! - .demographicsScreenInvalidMessage( - globalProvider.selectedLanguage); + .demographicsScreenInvalidMessage(lang); } return null; },