mirror of
https://github.com/Myzel394/quid_faciam_hodie.git
synced 2025-06-18 23:35:25 +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/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:quid_faciam_hodie/constants/themes.dart';
|
||||
import 'package:quid_faciam_hodie/screens/calendar_screen.dart';
|
||||
@ -50,6 +51,8 @@ class _MyAppState extends State<MyApp> {
|
||||
theme: LIGHT_THEME,
|
||||
darkTheme: DARK_THEME,
|
||||
themeMode: ThemeMode.system,
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
routes: {
|
||||
WelcomeScreen.ID: (context) => const WelcomeScreen(),
|
||||
MainScreen.ID: (context) => const MainScreen(),
|
||||
|
@ -153,6 +153,11 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
flutter_localizations:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_plugin_android_lifecycle:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -29,6 +29,8 @@ environment:
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_localizations:
|
||||
sdk: flutter
|
||||
|
||||
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
@ -68,6 +70,7 @@ dev_dependencies:
|
||||
|
||||
# The following section is specific to Flutter packages.
|
||||
flutter:
|
||||
generate: true
|
||||
|
||||
# The following line ensures that the Material Icons font is
|
||||
# included with your application, so that you can use the icons in
|
||||
|
Loading…
x
Reference in New Issue
Block a user