selfprivacy.org.app/lib/config/localization.dart
Inex Code 1bde176612 feat(translations): Activate support for some languages
Languages being activated are:
- Ukrainian
- German
- French
- Spanish
- Czech
- Polish
- Thai

Translation which are not finished will fall back to English.
2023-02-01 01:57:55 +03:00

32 lines
778 B
Dart

import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
class Localization extends StatelessWidget {
const Localization({
super.key,
this.child,
});
final Widget? child;
@override
Widget build(final BuildContext context) => EasyLocalization(
supportedLocales: const [
Locale('ru'),
Locale('en'),
Locale('uk'),
Locale('de'),
Locale('fr'),
Locale('es'),
Locale('cs'),
Locale('pl'),
Locale('th'),
],
path: 'assets/translations',
fallbackLocale: const Locale('en'),
useFallbackTranslations: true,
saveLocale: false,
useOnlyLangCode: true,
child: child!,
);
}