-
-
Notifications
You must be signed in to change notification settings - Fork 62
Description
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
- [i18n] Español ES #210
- [i18n] Español MX #209
- [i18n] Italian 'ita-it' translation #255
- [i18n] Traditional Chinese 'zho-tw' translation #211
- [i18n] Traditional South Korea 'kor-ko' translation #304
- We welcome all other languages to be included. If you plan to or want to make a contribution, its recommended you make an issue first, and we will help you get started :D
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