2021-12-01 15:50:01 +08:00
|
|
|
// Copyright 2021 The Gitea Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a MIT-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package setting
|
|
|
|
|
|
|
|
// defaultI18nLangNames must be a slice, we need the order
|
|
|
|
var defaultI18nLangNames = []string{
|
|
|
|
"en-US", "English",
|
|
|
|
"zh-CN", "简体中文",
|
|
|
|
"zh-HK", "繁體中文(香港)",
|
|
|
|
"zh-TW", "繁體中文(台灣)",
|
|
|
|
"de-DE", "Deutsch",
|
2022-06-15 18:08:49 +08:00
|
|
|
"fr-FR", "Français",
|
2021-12-01 15:50:01 +08:00
|
|
|
"nl-NL", "Nederlands",
|
2022-06-15 18:08:49 +08:00
|
|
|
"lv-LV", "Latviešu",
|
|
|
|
"ru-RU", "Русский",
|
2021-12-01 15:50:01 +08:00
|
|
|
"uk-UA", "Українська",
|
|
|
|
"ja-JP", "日本語",
|
2022-06-15 18:08:49 +08:00
|
|
|
"es-ES", "Español",
|
|
|
|
"pt-BR", "Português do Brasil",
|
2021-12-01 15:50:01 +08:00
|
|
|
"pt-PT", "Português de Portugal",
|
2022-06-15 18:08:49 +08:00
|
|
|
"pl-PL", "Polski",
|
|
|
|
"bg-BG", "Български",
|
|
|
|
"it-IT", "Italiano",
|
|
|
|
"fi-FI", "Suomi",
|
2021-12-01 15:50:01 +08:00
|
|
|
"tr-TR", "Türkçe",
|
2022-06-15 18:08:49 +08:00
|
|
|
"cs-CZ", "Čeština",
|
|
|
|
"sv-SE", "Svenska",
|
2021-12-01 15:50:01 +08:00
|
|
|
"ko-KR", "한국어",
|
2022-06-15 18:08:49 +08:00
|
|
|
"el-GR", "Ελληνικά",
|
2021-12-01 15:50:01 +08:00
|
|
|
"fa-IR", "فارسی",
|
2022-06-15 18:08:49 +08:00
|
|
|
"hu-HU", "Magyar nyelv",
|
|
|
|
"id-ID", "Bahasa Indonesia",
|
2021-12-01 15:50:01 +08:00
|
|
|
"ml-IN", "മലയാളം",
|
|
|
|
}
|
|
|
|
|
|
|
|
func defaultI18nLangs() (res []string) {
|
|
|
|
for i := 0; i < len(defaultI18nLangNames); i += 2 {
|
|
|
|
res = append(res, defaultI18nLangNames[i])
|
|
|
|
}
|
2022-06-20 18:02:49 +08:00
|
|
|
return res
|
2021-12-01 15:50:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func defaultI18nNames() (res []string) {
|
|
|
|
for i := 0; i < len(defaultI18nLangNames); i += 2 {
|
|
|
|
res = append(res, defaultI18nLangNames[i+1])
|
|
|
|
}
|
2022-06-20 18:02:49 +08:00
|
|
|
return res
|
2021-12-01 15:50:01 +08:00
|
|
|
}
|