Files
godot-website/assets/js/localize.js
Tiago 86bd543a52 Portuguese Localization (#1157)
* added portuguese i18n file and icluded pt under home's translations

* Localized additional terms in portuguese

* translated home page title text

* change Portuguese shorthand code (pt) to a more specific Brazilian Portuguese (pt_BR)

* updated localization format for Portuguese from pt_BR to pt-br to match the convention.

* cache bust the localize script

---------

Co-authored-by: tiagosomda <tiago@somda.net>
Co-authored-by: Emi <2206700+coppolaemilio@users.noreply.github.com>
2025-09-11 22:56:25 +02:00

21 lines
450 B
JavaScript

// Get the language label
const languageMap = {
'de': 'Deutsch',
'en': 'English',
'es': 'Español',
'fr': 'Français',
'ja': '日本語',
'ko': '한국어',
'pl': 'Polski',
'pt-br': 'Português',
'zh-cn': '中文(简体)',
'zh-tw': '中文(繁體)',
};
document.querySelectorAll('.localize-language-label').forEach(function(el) {
const lang = el.textContent;
if (languageMap[lang]) {
el.textContent = languageMap[lang];
}
});