mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-06-19 05:40:06 +10:00
Chinese Translation
added Chinese Translation for installer https://github.com/SpotX-CLI/SpotX-Win/issues/189 Co-Authored-By: lumineyuri <110418934+lumineyuri@users.noreply.github.com>
This commit is contained in:
+10
-2
@@ -107,7 +107,7 @@ function Format-LanguageCode {
|
||||
|
||||
begin {
|
||||
$supportLanguages = @(
|
||||
'en', 'ru', 'it', 'tr', 'ka', 'pl', 'es', 'fr', 'hi', 'pt', 'id', 'vi', 'ro', 'de', 'hu'
|
||||
'en', 'ru', 'it', 'tr', 'ka', 'pl', 'es', 'fr', 'hi', 'pt', 'id', 'vi', 'ro', 'de', 'hu', 'zh'
|
||||
)
|
||||
}
|
||||
|
||||
@@ -174,6 +174,10 @@ function Format-LanguageCode {
|
||||
$returnCode = 'hu'
|
||||
break
|
||||
}
|
||||
'^zh' {
|
||||
$returnCode = 'zh'
|
||||
break
|
||||
}
|
||||
Default {
|
||||
$returnCode = $PSUICulture.Remove(2)
|
||||
break
|
||||
@@ -272,6 +276,10 @@ function Set-ScriptLanguageStrings($LanguageCode) {
|
||||
$langStrings = CallLang -clg "hu"
|
||||
break
|
||||
}
|
||||
'zh' {
|
||||
$langStrings = CallLang -clg "zh"
|
||||
break
|
||||
}
|
||||
Default {
|
||||
# Default to English if unable to find a match.
|
||||
$langStrings = CallLang -clg "en"
|
||||
@@ -292,7 +300,7 @@ $lang = Set-ScriptLanguageStrings -LanguageCode $langCode
|
||||
# Set variable 'ru'.
|
||||
if ($langCode -eq 'ru') { $ru = $true }
|
||||
# Set variable 'add translation line'.
|
||||
if ($langCode -match '^(it|tr|ka|pl|es|fr|hi|pt|id|vi|ro|de|hu)') { $line = $true }
|
||||
if ($langCode -match '^(it|tr|ka|pl|es|fr|hi|pt|id|vi|ro|de|hu|zh)') { $line = $true }
|
||||
|
||||
# Automatic length of stars
|
||||
$au = ($lang).Author.Length + ($lang).Author2.Length
|
||||
|
||||
Reference in New Issue
Block a user