Skip to content

Commit

Permalink
doc(i18n-with-aurelia): remove unnecessary brace and fix indentation (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
David Timovski authored and zewa666 committed Mar 3, 2018
1 parent af2ecce commit c8e736e
Showing 1 changed file with 21 additions and 22 deletions.
43 changes: 21 additions & 22 deletions doc/article/en-US/i18n-with-aurelia.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,28 +215,27 @@ be slight differences. The following listings show the configuration for first t
// otherwise add "allowSyntheticDefaultImports": true, to your tsconfig

export function configure(aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging()
.plugin('aurelia-i18n', (instance) => {
let aliases = ['t', 'i18n'];
// add aliases for 't' attribute
TCustomAttribute.configureAliases(aliases);

// register backend plugin
instance.i18next.use(Backend);

// adapt options to your needs (see http://i18next.com/docs/options/)
// make sure to return the promise of the setup method, in order to guarantee proper loading
return instance.setup({
backend: { // <-- configure backend settings
loadPath: './locales/{{lng}}/{{ns}}.json', // <-- XHR settings for where to get the files from
},
attributes: aliases,
lng : 'de',
fallbackLng : 'en',
debug : false
});
aurelia.use
.standardConfiguration()
.developmentLogging()
.plugin('aurelia-i18n', (instance) => {
let aliases = ['t', 'i18n'];
// add aliases for 't' attribute
TCustomAttribute.configureAliases(aliases);

// register backend plugin
instance.i18next.use(Backend);

// adapt options to your needs (see http://i18next.com/docs/options/)
// make sure to return the promise of the setup method, in order to guarantee proper loading
return instance.setup({
backend: { // <-- configure backend settings
loadPath: './locales/{{lng}}/{{ns}}.json', // <-- XHR settings for where to get the files from
},
attributes: aliases,
lng : 'de',
fallbackLng : 'en',
debug : false
});
});

Expand Down

0 comments on commit c8e736e

Please sign in to comment.