From d1a02464e7c6a862817e6732897145faa599d6f8 Mon Sep 17 00:00:00 2001 From: amd64fox <62529699+amd64fox@users.noreply.github.com> Date: Mon, 29 May 2023 12:28:17 +0300 Subject: [PATCH] fixed language detection bug - bug fix for languages with more than 2 characters #423 --- Install.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Install.ps1 b/Install.ps1 index 7d92610..224918e 100644 --- a/Install.ps1 +++ b/Install.ps1 @@ -214,7 +214,7 @@ function Format-LanguageCode { # Checking the long language code if ($long_code -and $returnCode -NotIn $supportLanguages) { - $returnCode = $PSUICulture.Remove(2) + $returnCode = $returnCode -split "-" | Select-Object -First 1 } # Checking the short language code if ($returnCode -NotIn $supportLanguages) {