mirror of
https://github.com/Myzel394/quid_faciam_hodie.git
synced 2025-06-19 15:45:26 +02:00
added localization functionality
This commit is contained in:
parent
e49c8f8211
commit
08c7436bb3
3
l10n.yaml
Normal file
3
l10n.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
arb-dir: lib/locale/l10n
|
||||||
|
template-arb-file: app_en.arb
|
||||||
|
output-localization-file: app_localizations.dart
|
3
lib/locale/l10n/app_de.arb
Normal file
3
lib/locale/l10n/app_de.arb
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"helloWorld": "Hallo Welt"
|
||||||
|
}
|
6
lib/locale/l10n/app_en.arb
Normal file
6
lib/locale/l10n/app_en.arb
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"helloWorld": "Hello World!",
|
||||||
|
"@helloWorld": {
|
||||||
|
"description": "The conventional newborn programmer greeting"
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,7 @@ import 'package:camera/camera.dart';
|
|||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:quid_faciam_hodie/constants/themes.dart';
|
import 'package:quid_faciam_hodie/constants/themes.dart';
|
||||||
import 'package:quid_faciam_hodie/screens/calendar_screen.dart';
|
import 'package:quid_faciam_hodie/screens/calendar_screen.dart';
|
||||||
@ -50,6 +51,8 @@ class _MyAppState extends State<MyApp> {
|
|||||||
theme: LIGHT_THEME,
|
theme: LIGHT_THEME,
|
||||||
darkTheme: DARK_THEME,
|
darkTheme: DARK_THEME,
|
||||||
themeMode: ThemeMode.system,
|
themeMode: ThemeMode.system,
|
||||||
|
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||||
|
supportedLocales: AppLocalizations.supportedLocales,
|
||||||
routes: {
|
routes: {
|
||||||
WelcomeScreen.ID: (context) => const WelcomeScreen(),
|
WelcomeScreen.ID: (context) => const WelcomeScreen(),
|
||||||
MainScreen.ID: (context) => const MainScreen(),
|
MainScreen.ID: (context) => const MainScreen(),
|
||||||
|
@ -153,6 +153,11 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.1"
|
||||||
|
flutter_localizations:
|
||||||
|
dependency: "direct main"
|
||||||
|
description: flutter
|
||||||
|
source: sdk
|
||||||
|
version: "0.0.0"
|
||||||
flutter_plugin_android_lifecycle:
|
flutter_plugin_android_lifecycle:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -29,6 +29,8 @@ environment:
|
|||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
flutter_localizations:
|
||||||
|
sdk: flutter
|
||||||
|
|
||||||
|
|
||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
@ -68,6 +70,7 @@ dev_dependencies:
|
|||||||
|
|
||||||
# The following section is specific to Flutter packages.
|
# The following section is specific to Flutter packages.
|
||||||
flutter:
|
flutter:
|
||||||
|
generate: true
|
||||||
|
|
||||||
# The following line ensures that the Material Icons font is
|
# The following line ensures that the Material Icons font is
|
||||||
# included with your application, so that you can use the icons in
|
# included with your application, so that you can use the icons in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user