0.2.0 • Published 6 years ago

studiowaaz-localization v0.2.0

Weekly downloads
9
License
ISC
Repository
github
Last release
6 years ago

studiowaaz-localization

This is a port of the 0.5 Apostrophe Localization module, for the Apostrophe 2.0 nodejs/express based CMS.

This is not a production ready module so please use carefully, and let us know of any issues and such.

Installation

npm install studiowaaz-localization

Configuration

You can configure this either at the application level

//app.js

modules:{
 ... other modules ...
  'studiowaaz-localization': {
    default: 'eu',
    locales: ['eu','fr','es']
  }
}

At the moment, module automatically redirect to a prefixed locale slug. For example '/' is redirect to '/eu/' with the previous configuration.

Pieces / Pages properties are localized using the localized key on docs. So it can be a performance problem if you have a lot of translations.

Use

Just switch locale in url and add content to your pages or pieces.

Making link to localized url

Each page or piece had a _localeurl property. Use it in order to _url.

Get current locale from template

{{ apos.waazloc.getLocale() }}

TODO

  • Never Types
  • Universal Content
  • aposLocalized collection implement to stop storing translations on the aposDocs.
  • task to initialize existing content on default locale
0.2.0

6 years ago

0.1.0

6 years ago

0.0.5

6 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago