added localization
This commit is contained in:
3
l10n.yaml
Normal file
3
l10n.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
arb-dir: lib/l10n
|
||||
template-arb-file: app_en.arb
|
||||
output-localization-file: app_localizations.dart
|
||||
4
lib/l10n/app_de.arb
Normal file
4
lib/l10n/app_de.arb
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"german": "Deutsch",
|
||||
"english": "Englisch"
|
||||
}
|
||||
4
lib/l10n/app_en.arb
Normal file
4
lib/l10n/app_en.arb
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"german": "German",
|
||||
"english": "English"
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:resume/pages/landing_page.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'theme.dart' show darkTheme;
|
||||
|
||||
void main() {
|
||||
@@ -14,6 +16,17 @@ class Resume extends StatelessWidget {
|
||||
return MaterialApp(
|
||||
title: 'Resume',
|
||||
theme: darkTheme,
|
||||
localizationsDelegates: const [
|
||||
AppLocalizations.delegate,
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: const [
|
||||
Locale('en'),
|
||||
Locale('de'),
|
||||
],
|
||||
locale: const Locale('en'),
|
||||
routes: {
|
||||
'/': (context) => const LandingPage(),
|
||||
},
|
||||
|
||||
@@ -12,6 +12,9 @@ dependencies:
|
||||
|
||||
cupertino_icons: ^1.0.8
|
||||
url_launcher: ^6.3.1
|
||||
flutter_localizations:
|
||||
sdk: flutter
|
||||
intl: any
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
@@ -20,6 +23,7 @@ dev_dependencies:
|
||||
flutter_lints: ^4.0.0
|
||||
|
||||
flutter:
|
||||
generate: true
|
||||
uses-material-design: true
|
||||
|
||||
assets:
|
||||
|
||||
Reference in New Issue
Block a user