add localization for no_country text
This commit is contained in:
@@ -21,7 +21,6 @@ class CountryLocalizations {
|
||||
late Map<String, String> _localizedStrings;
|
||||
|
||||
Future<bool> load() async {
|
||||
print('locale.languageCode: ${locale.languageCode}');
|
||||
String jsonString = await rootBundle.loadString(
|
||||
'packages/country_code_picker/i18n/${locale.languageCode}.json');
|
||||
Map<String, dynamic> jsonMap = json.decode(jsonString);
|
||||
|
||||
@@ -264,5 +264,6 @@
|
||||
"RS": "Serbia",
|
||||
"SX": "Sint Maarten (Dutch part)",
|
||||
"SS": "South Sudan",
|
||||
"XK": "Kosovo"
|
||||
"XK": "Kosovo",
|
||||
"no_country": "No country found"
|
||||
}
|
||||
@@ -248,5 +248,6 @@
|
||||
"ZA": "Sudafrica",
|
||||
"ZM": "Zambia",
|
||||
"ZW": "Zimbabwe",
|
||||
"XK": "Kosovo"
|
||||
"XK": "Kosovo",
|
||||
"no_country": "Nessun paese trovato"
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:country_code_picker/country_code.dart';
|
||||
import 'package:country_code_picker/country_localizations.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// selection dialog used for selection of the country code
|
||||
@@ -176,7 +177,8 @@ class _SelectionDialogState extends State<SelectionDialog> {
|
||||
}
|
||||
|
||||
return Center(
|
||||
child: Text('No country found'),
|
||||
child: Text(CountryLocalizations.of(context)?.translate('no_country') ??
|
||||
'No country found'),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user