forked from bluemix/Tourism-Demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change language fade and slide transitions
- Loading branch information
Showing
10 changed files
with
314 additions
and
203 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
|
||
import 'package:flutter/widgets.dart'; | ||
|
||
class Translations { | ||
Translations(this.locale); | ||
|
||
final Locale locale; | ||
|
||
static Translations of(BuildContext context) { | ||
return Localizations.of<Translations>(context, Translations); | ||
} | ||
|
||
static Map<String, Map<String, String>> _localizedValues = { | ||
'en': { | ||
'title': 'Tourism Demo', | ||
'language': 'عربي', | ||
'june': 'June', | ||
'days': 'Days', | ||
'hotels': 'hotels', | ||
'star': 'star', | ||
}, | ||
'ar': { | ||
'title': 'تطبيق سياحة', | ||
'language': 'English', | ||
'june': 'حزيران', | ||
'days': 'أيام', | ||
'star': 'نجوم', | ||
'hotels': 'فنادق', | ||
}, | ||
}; | ||
|
||
Map get _vocabularies => _localizedValues[locale.languageCode]; | ||
|
||
String get title { | ||
return _vocabularies['title']; | ||
} | ||
|
||
String get language { | ||
return _vocabularies['language']; | ||
} | ||
|
||
String get june { | ||
return _vocabularies['june']; | ||
} | ||
|
||
String get days { | ||
return _vocabularies['days']; | ||
} | ||
|
||
String get hotels { | ||
return _vocabularies['hotels']; | ||
} | ||
|
||
String get star { | ||
return _vocabularies['star']; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.