Skip to content

Ideas for an i18n module

Vildan Softic edited this page Feb 15, 2015 · 13 revisions

Lets gather here some ideas how we'd like to structure an I18N module for use in Aurelia. Just add your thoughts down here and try to categorize them. Also add different options if you can think of them

General Development

  • Use an existing module (e.g. i18next.com)
  • Custom module but built using small helper modules (e.g. MomentJS for Dates, Intl. API for Number/Date formats)
  • Custom, everything done by ourselves

Area of use

  • independent ES6 module, also to be used outside of Aurelia (e.g. I18N-Core)
  • Separate Plugin to work with I18N-Core (Aurelia-I18N)
  • Pure Aurelia solution

Features

  • translation
  • number formats (separators, etc)
  • dates
  • currency
  • pluralization
  • placeholders --> Hello {name}!

Aurelia specific features

  • Translation via code (e.g. i18n.tr('KEY') --> returns translated version)
  • Filters aka ValueConverters for declarative translations
  • live-switch of current language
  • default widgets --> e.g. Flag list, DatePicker, ...

Resource location

  • local files (e.g. JSON, or PO files)
  • load via Ajax from Backend --> define a specific interface
  • in code setup --> e.g. if you render the translations into the index.html from the backend
  • resource file bundles
Clone this wiki locally