question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I18N and Metadata Translations for Data Package

See original GitHub issue

How should the standard support titles, descriptions and data fields in languages other than English?

Proposal (Nov 2016)

An internationalised field:

# i18n
"title": { 
    "": "Israel's 2015 budget", 
    "he-IL": "תקציב לשנת 2015", 
    "es": "Presupuestos Generales del Estado para el año 2015 de Israel" 
}
...

Summary:

Each localizable string in datapackage.json could take two forms:

  • A simple string (for backward compatibility)
  • An object, mapping from ISO Locale codes (with or without the region specification, e.g. ‘en’, or ‘es-ES’) to their representations.
  • In this object, you could have an empty key “” which denotes the ‘default’ representation

Not all properties would be localizable for now. For the sake of simplicity, we limit this to only the following properties;

  • title (at package and resource level)
  • description (at package and resource level)

Default Language

You can define the default language for a data package using a lang attribute:

"lang": "en"

The default language if none is specified is English (?).

Issue Analytics

  • State:open
  • Created 10 years ago
  • Comments:22 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
rufuspollockcommented, Dec 1, 2016

So, I’ve thought quite a bit about this and I generally agree with @akariv approach:

"title": { 
    "": "Israel's 2015 budget", 
    "he-IL": "תקציב לשנת 2015", 
    "es": "Presupuestos Generales del Estado para el año 2015 de Israel" 
}
...

I’ve updated the main description of the issue with a relatively full spec based on this.

Welcome comments from @frictionlessdata/specs-working-group

Research

0reactions
ppKrausscommented, May 28, 2017

Hi, no news here (only later v1.1)?


If “real life example” is useful to this discussion … My approach (while no v1.1) at datasets-br/state-codes’s datapackage.json, was to add lang descriptor and lang-suffix differentiator. The lang at source level, as default for all fields.

Hum… the interpretation was “language of the descriptions (!and CSV textual contents)”.

If some field or descriptor need to use other language, I use a suffix -{lang}. In the example we used title as default (en) and title-pt for Portuguese title.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prepare component for translation - Angular
To prepare your project for translation, complete the following actions. ... In a component template, the i18n metadata is the value of the...
Read more >
Translations | Metadata API Developer Guide
This metadata type allows you to work with translations for various supported languages. The ability to translate component labels is part of the...
Read more >
Preparing a Project to Support Internationalization
These procedures must be performed whether you plan to support only metadata internationalization, only data internationalization, or both.
Read more >
Metadata for the Multilingual Web - Usage Scenarios ... - W3C
Create a Translation Package in OASIS XML Localization Interchange ... Load XML, HTML5 and XLIFF content for which ITS 2.0 meta data exists ......
Read more >
Localization of DHIS 2 - DHIS2 Documentation
The DHIS 2 Translation app can be used to translate all metadata (data elements, categories, organization units, etc) into any locale which ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found