loadTranslations method
Implementation
Future<void> loadTranslations(String langCode) async {
try {
final jsonString = await rootBundle.loadString('assets/lang/$langCode.json');
final Map<String, dynamic> jsonMap = json.decode(jsonString);
_translations = jsonMap.map((key, value) => MapEntry(key, value.toString()));
} catch (e) {
_translations = {};
}
}