Added German Translation

This commit is contained in:
Robin
2022-10-08 14:27:10 +02:00
committed by GitHub
parent 0de28ecf12
commit fd77cf5994
+10 -2
View File
@@ -104,7 +104,7 @@ function Format-LanguageCode {
begin { begin {
$supportLanguages = @( $supportLanguages = @(
'en', 'ru', 'it', 'tr', 'ka', 'pl', 'es', 'fr', 'hi', 'pt', 'id', 'vi', 'ro' 'en', 'ru', 'it', 'tr', 'ka', 'pl', 'es', 'fr', 'hi', 'pt', 'id', 'vi', 'ro', 'de'
) )
} }
@@ -162,6 +162,10 @@ function Format-LanguageCode {
'^ro' { '^ro' {
$returnCode = 'ro' $returnCode = 'ro'
break break
}
'^de' {
$returnCode = 'de'
break
} }
Default { Default {
$returnCode = $PSUICulture.Remove(2) $returnCode = $PSUICulture.Remove(2)
@@ -253,6 +257,10 @@ function Set-ScriptLanguageStrings($LanguageCode) {
$langStrings = CallLang -clg "ro" $langStrings = CallLang -clg "ro"
break break
} }
'de' {
$langStrings = CallLang -clg "de"
break
}
Default { Default {
# Default to English if unable to find a match. # Default to English if unable to find a match.
$langStrings = CallLang -clg "en" $langStrings = CallLang -clg "en"
@@ -273,7 +281,7 @@ $lang = Set-ScriptLanguageStrings -LanguageCode $langCode
# Set variable 'ru'. # Set variable 'ru'.
if ($langCode -eq 'ru') { $ru = $true } if ($langCode -eq 'ru') { $ru = $true }
# Set variable 'add translation line'. # Set variable 'add translation line'.
if ($langCode -match '^(it|tr|ka|pl|es|fr|hi|pt|id|vi|ro)') { $line = $true } if ($langCode -match '^(it|tr|ka|pl|es|fr|hi|pt|id|vi|ro|de)') { $line = $true }
# Automatic length of stars # Automatic length of stars
$au = ($lang).Author.Length + ($lang).Author2.Length $au = ($lang).Author.Length + ($lang).Author2.Length