meetling
meetling copied to clipboard
Internationalization
Add support for internationalization, i.e. translation and formatting of times/dates, numbers, etc.
Users should be able to set language and timezone (attributes of User) and browser settings (navigator.language, Intl.DateTimeFormat.resolvedOptions.timeZone) should only be used as suggestions / default values.
i18n toolchain:
- Server: Tornado's built-in i18n (gettext)
- Client: i18next (JSON)
- Translation platform: Transifex
Draft:
"""
Types
-----
A *language* is expressed as simplified IETF language code in the form of `{lang}-{region}`, where
both both values consist of two characters, *lang* is lower case and *region* is upper case, e.g.
``en-US``.
"""
class Application:
"""
.. attribute:: languages
List of available languages.
Subclass API: Defaults to ['de-DE', 'en-US'].
"""
def login(self, code=None, language='en-US'):
"""
*language* is the selected language of the new user.
"""
class User:
"""
.. describe:: language
Selected language from the list of available languages.
"""
Depends on #68 .
Experimental branch: https://github.com/noyainrain/meetling/tree/i18n