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.
npm install studiowaaz-localization
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.
Just switch locale in url and add content to your pages or pieces.
Each page or piece had a _localeurl
property. Use it in order to _url
.
{{ apos.waazloc.getLocale() }}
- [ ] Never Types
- [ ] Universal Content
- [ ] aposLocalized collection implement to stop storing translations on the aposDocs.
- [ ] task to initialize existing content on default locale