mirror of
https://github.com/godotengine/godot-website.git
synced 2025-12-31 09:48:43 +03:00
* 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>
21 lines
450 B
JavaScript
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];
|
|
}
|
|
});
|