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

Translated or localized titles and descriptions #135

Closed
zejn opened this issue Aug 20, 2014 · 3 comments
Closed

Translated or localized titles and descriptions #135

zejn opened this issue Aug 20, 2014 · 3 comments

Comments

@zejn
Copy link

zejn commented Aug 20, 2014

Titles and descriptions should support more than one language.

One possible (not necessarily best) solution is the title being either a string

{
    "title": "Foo Package"
}

or an object:

{
    "title": {
        "en": "Foo Package",
        "de": "Foo Paket"
    }
}
@Stiivi
Copy link
Contributor

Stiivi commented Aug 21, 2014

Good idea to have a localization. On the other hand, from my experience with localizable metadata, it is good to have it separate from the main metadata structure for multiple reasons:

  1. makes parsing the main metadata way much easier (in this case it makes much easier to conform to the standard)
  2. makes inclusion of other translations very easy – just add another translation file

Have it a separate JSON, for example: locale_XX.json or locales/XX.json with contents:

{
    "fields": [
        "NAME" : { "label": "TRANSLATED_LABEL", "description": "TRANSLATED_DESCRIPTION" }
    ]
}

Someone supplies a translation? Just include the file in the data package and you are ready to deploy!

@rufuspollock
Copy link
Contributor

See also #42 (i18n for data package)

@rufuspollock
Copy link
Contributor

DUPLICATE of #42

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

No branches or pull requests

4 participants