Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internationalization #17

Open
noyainrain opened this issue Nov 5, 2015 · 5 comments
Open

Internationalization #17

noyainrain opened this issue Nov 5, 2015 · 5 comments

Comments

@noyainrain
Copy link
Owner

Add support for internationalization, i.e. translation and formatting of times/dates, numbers, etc.

@noyainrain
Copy link
Owner Author

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.

@noyainrain noyainrain self-assigned this Jan 27, 2017
@noyainrain
Copy link
Owner Author

i18n toolchain:

@noyainrain
Copy link
Owner Author

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.
    """

@noyainrain
Copy link
Owner Author

Depends on #68 .

@noyainrain noyainrain removed their assignment Jun 2, 2017
@noyainrain
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant