diff --git a/ionic/translation/translate.ts b/ionic/translation/translate.ts index 835433e57d..eaf62fcc03 100644 --- a/ionic/translation/translate.ts +++ b/ionic/translation/translate.ts @@ -1,5 +1,29 @@ import {Injectable} from 'angular2/angular2'; +/** + * Provide multi-language and i18n support in your app. Translate works by + * mapping full strings to language translated ones. That means that you don't need + * to provide strings for your default language, just new languages. + * + * @usage + * ```js + * Translate.translations({ + * 'de': { + * 'Welcome to MyApp': 'Willkommen auf' + * } + * }) + * + * Changing the default language: + * + * Translate.setLanguage('de'); + * ``` + * + * Usage in a template: + * + * ```js + * {{ 'Welcome to MyApp' | translate }} + * ``` + */ @Injectable() export class Translate { constructor() {