wh-iterabb-it / meowfacts

🐈 a simple api which returns a catfact
https://meowfacts.herokuapp.com/
MIT License
392 stars 54 forks source link

[I18N] Looking for Help With Translation #175

Open BeauBouchard opened 2 years ago

BeauBouchard commented 2 years ago

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

BeauBouchard commented 2 years ago

Thank you very much to @ShizzaHo who completed the Russian and Ukrainian languages!

BeauBouchard commented 2 years ago

We also need to document the new middleware responses in the apidocs which I am putting in https://github.com/wh-iterabb-it/meowfacts/issues/177. I am asking @switchhalt to help if they can with the documentation as well.

jackneer commented 1 year ago

@BeauBouchard may I add Traditional Chinese 'zh-TW' translation?

BeauBouchard commented 1 year ago

@BeauBouchard may I add Traditional Chinese 'zh-TW' translation?

I broke that out into an issue @jackneer :D -> https://github.com/wh-iterabb-it/meowfacts/issues/211

sonseong10 commented 1 year ago

@BeauBouchard may I add Traditional South Korea 'ko-kr' translation? 🥸

BeauBouchard commented 1 year ago

@BeauBouchard may I add Traditional South Korea 'ko-kr' translation? disguised_face

That would be amazing. To help out I created a separate issue for that localization.

https://github.com/wh-iterabb-it/meowfacts/issues/304

If you are interested at all, we would love to add support for Korean language, feel free to reply in the issue and i can assign it to you.

Rhubarbian407 commented 1 month ago

@BeauBouchard may I add a Lithuanian 'lt-LT' translation? :D