Skip to content

Commit

Permalink
README again
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMitterer committed Jul 28, 2014
1 parent 92ae57c commit 9bf3e81
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions README.md
Expand Up @@ -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
Expand Down Expand Up @@ -39,23 +40,31 @@ void main(List<String> 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###
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
@@ -1,5 +1,5 @@
name: l10n
version: 0.9.1
version: 0.9.4
author: Mike Mitterer <office@mikemitterer.at>
description: Creates translatable PO-Files, strong orientation to xgettext

Expand Down

0 comments on commit 9bf3e81

Please sign in to comment.