Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
robisim74 committed Nov 12, 2018
1 parent 9087f47 commit 6affdb5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ It allows, in addition to translation, to localize numbers and dates of your app

---

Library version: 6.3.1 - [Changelog](https://github.com/robisim74/angular-l10n/releases)
Library version: 6.4.0 - [Changelog](https://github.com/robisim74/angular-l10n/releases)

---

Expand Down
2 changes: 1 addition & 1 deletion docs/spec/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Method | Function
`getLanguageDirection(languageCode?: string): string` |
`getCurrentLanguage(): string` |
`getCurrentCountry(): string` |
`getCurrentLocale(): string` | Returns the well formatted locale as {languageCode}[-scriptCode][-countryCode]
`getCurrentScript(): string` |
`getCurrentLocale(): string` | Returns the well formatted locale as {languageCode}[-scriptCode][-countryCode]
`getCurrentNumberingSystem(): string` |
`getCurrentCalendar(): string` |
`getDefaultLocale(): string` |
Expand Down
18 changes: 18 additions & 0 deletions docs/spec/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ Property | Value
`storage?: StorageStrategy` | Defines the storage to be used for language, default locale & currency
`cookieExpiration?: number` | If the cookie expiration is omitted, the cookie becomes a session cookie
`localizedRouting?: ISOCode[]` | Enables localized routing with the provided ISO codes
`localizedRoutingOptions?: LocalizedRoutingOptions` | Options for localized routing

### TranslationConfig
Property | Value
Expand Down Expand Up @@ -553,3 +554,20 @@ You can use the Sitemap to tell Google all of the locale variants for each URL:
```

For more info, visit [Search Console Help - International](https://support.google.com/webmasters/topic/2370587?hl=en&ref_topic=4598733)

### Options

#### Default routing
If you don't want a localized routing for default language or locale, you can enable it during the configuration:
```TypeScript
const l10nConfig: L10nConfig = {
locale: {
...
localizedRouting: [ISOCode.Language, /* ISOCode.Script, */ /* ISOCode.Country */],
localizedRoutingOptions: {
defaultRouting: true
}
},
...
};
```
4 changes: 2 additions & 2 deletions docs/spec/lazy-loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const l10nConfig: L10nConfig = {
})
export class ListModule {

constructor(public l10nLoader: L10nLoader) {
this.l10nLoader.load();
constructor(public translation: TranslationService) {
this.translation.init();
}

}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular-l10n",
"private": true,
"version": "6.3.1",
"version": "6.4.0",
"description": "An Angular library to translate messages, dates and numbers",
"main": "./bundles/angular-l10n.umd.js",
"module": "./fesm5/angular-l10n.js",
Expand Down

0 comments on commit 6affdb5

Please sign in to comment.