Skip to content

[I18N] Looking for Help With Translation #175

@BeauBouchard

Description

@BeauBouchard

Call for Translators

While trying to translate I learned a lot and direct translations may not be the most accurate. I am always looking for suggestions and help in this regard and let this issue stand as a call for maintainers or contributors who want to improve the translation or even help make the API available in different languages.

Translation Issues that could use your Help

Everything Explained

I18N means Internationalization with 18 letters between I and N, its often abbreviated. Supporting languages isn't always easy, as languages often have regional dialects which is why they created the word localization. This is mapping the language to a location, an easy example of this is thinking of french in Canada or France, Spanish in Mexico vs Spain, or American English vs England's English.

We want to adhere to the Standards for Content-Language and Accept-Language going forward.

Note: Language tags are formally defined in RFC 5646, which rely on the ISO 639 standard (quite often the ISO 639-1 code list) for language codes to be used.

FAQ

Example of how to make a new Language

In this example, we add a new language file for Canadian English.

We only need to make a single file, It would be src/models/localization/eng-ca.js and look like

const facts = [
  "Cats have been the most popular pet for families in Canada since data was first collected in 1987.",
  "..."
];

const langName = "English", // normally this is the language name
  langISO = "eng", 
  langLocale = "ca", 
  langLocaleName = "Canadian"; 

module.exports = {
  langName,
  langISO,
  langLocale,
  langLocaleName,
  code: `${langISO}-${langLocale}`,
  codeName: `${langName} (${langLocaleName})`,
  facts: facts,
};

If you query the api with eng-ca language parameter you will get the facts appearing more for the tailored localization in the language of english.

Feel free to change the facts to be more meaningful to the location you want, as the original English facts are with America in mind, I would love to see what other places have for accurate and high-quality facts about cats.

:D Looking forward to all contributions

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreA Story that provides value to the Team or Product, as opposed to an external Stakeholderhelp wantedExtra attention is neededi18ntranslation or internationalization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions