first step form translation

merge-requests/1/merge
Elham Rababah 6 years ago
parent a485d7b105
commit 36fa0c5a2f

@ -0,0 +1,25 @@
// GENERATED FILE, do not edit!
import 'package:i18n/i18n.dart' as i18n;
String get _languageCode => 'en';
String get _localeName => 'en';
String _plural(int count, {String zero, String one, String two, String few, String many, String other}) =>
i18n.plural(count, _languageCode, zero:zero, one:one, two:two, few:few, many:many, other:other);
String _ordinal(int count, {String zero, String one, String two, String few, String many, String other}) =>
i18n.ordinal(count, _languageCode, zero:zero, one:one, two:two, few:few, many:many, other:other);
String _cardinal(int count, {String zero, String one, String two, String few, String many, String other}) =>
i18n.cardinal(count, _languageCode, zero:zero, one:one, two:two, few:few, many:many, other:other);
class Ar {
const Ar();
ButtonAr get button => ButtonAr(this);
}
class ButtonAr {
final Ar _parent;
const ButtonAr(this._parent);
String get save => "حفظ";
String get load => "تحميل";
}

@ -0,0 +1,3 @@
button:
save: حفظ
load: تحميل

@ -0,0 +1,25 @@
// GENERATED FILE, do not edit!
import 'package:i18n/i18n.dart' as i18n;
String get _languageCode => 'en';
String get _localeName => 'en';
String _plural(int count, {String zero, String one, String two, String few, String many, String other}) =>
i18n.plural(count, _languageCode, zero:zero, one:one, two:two, few:few, many:many, other:other);
String _ordinal(int count, {String zero, String one, String two, String few, String many, String other}) =>
i18n.ordinal(count, _languageCode, zero:zero, one:one, two:two, few:few, many:many, other:other);
String _cardinal(int count, {String zero, String one, String two, String few, String many, String other}) =>
i18n.cardinal(count, _languageCode, zero:zero, one:one, two:two, few:few, many:many, other:other);
class En {
const En();
ButtonEn get button => ButtonEn(this);
}
class ButtonEn {
final En _parent;
const ButtonEn(this._parent);
String get save => "Save";
String get load => "Load";
}

@ -0,0 +1,4 @@
button:
save: Save
load: Load

@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import './routes.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {

@ -1,9 +1,17 @@
import '../../routes.dart';
import 'package:flutter/material.dart';
import '../../i18n/ar.i18n.dart' as ar;
import '../../i18n/en.i18n.dart' as en;
class AppDrawer extends StatelessWidget {
ar.Ar arLang = ar.Ar();
en.En enLang = en.En();
@override
Widget build(BuildContext context) {
print(arLang.button.save);
print(enLang.button.save);
return Drawer(
child: Column(
children: <Widget>[

@ -256,6 +256,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.3"
i18n:
dependency: "direct main"
description:
name: i18n
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.10"
image:
dependency: transitive
description:
@ -403,6 +410,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.5"
quick_log:
dependency: transitive
description:
name: quick_log
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.0"
quiver:
dependency: transitive
description:
@ -410,6 +424,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
rxdart:
dependency: transitive
description:
name: rxdart
url: "https://pub.dartlang.org"
source: hosted
version: "0.23.1"
scratch_space:
dependency: transitive
description:

@ -24,6 +24,7 @@ dependencies:
intl: ^0.16.1
http: ^0.12.0+4
provider: ^3.0.0
i18n: any
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.

Loading…
Cancel
Save