From 9bf3e812eeae3e4dd35325e5640b9eea2412f341 Mon Sep 17 00:00:00 2001 From: Mike Mitterer Date: Mon, 28 Jul 2014 18:23:33 +0200 Subject: [PATCH] README again --- README.md | 15 ++++++++++++--- pubspec.yaml | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a77a20b..a9d2ef4 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ If Dart 1.6 is out then ```bash $ pub global activate mkl10nlocale.dart ``` +should work... You can run the script from any local directory. ```bash @@ -39,23 +40,31 @@ void main(List arguments) { // translate.locale = Intl.shortLocale(locale); // Step 1 - sourround your text with l10n(...) - print(l10n("This is a test")); // Try this: print(l10n("This is a test").message); + // Try this: print(l10n("This is a test").message); + print(l10n("This is a test")); // Step 2 - run mkl10nlocale -l de,en example/ - // Step 3 - add the import-statement for locale/messages.dart + set the locale + // Step 3 - add the import-statement for locale/messages.dart + // + set the locale // Step 4 - add 'translate' to your print statement print(translate(l10n("This is a test"))); - // Step 5 - Translate the entry in your PO (for example local/de/messages.po + // Step 5 - Translate the entry in your + // PO (for example local/de/messages.po // Step 6 - run mkl10nlocale -l de,en // Step 7 - run your program }); } +``` +```bash +$ dart mini.dart +SystemLocale: de_AT +Dies ist ein TEST! ``` ###System requirements### diff --git a/pubspec.yaml b/pubspec.yaml index f948ee3..c38aa4f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: l10n -version: 0.9.1 +version: 0.9.4 author: Mike Mitterer description: Creates translatable PO-Files, strong orientation to xgettext