Sophia-Script-for-Windows
Sophia-Script-for-Windows copied to clipboard
Can't run on Czech windows
Prerequisites
- [X] Verify that this is not a Windows issue;
- [X] Refer to the Before running.
- [X] Refer to the How to use.
- [ ] If you issue concerns the Wrapper, please mention @BenchTweakGaming in issue
Steps to reproduce
I can't run on Czech windows. Is there some fallback to the US language so I can run it? I don't need Czech translation. I just need to run it.
Hm... I didn't understand what you mean by "I can't run on Czech windows. Is there some fallback to the US language so I can run it?". Any screenshots or something?
As I said, because I have Czech windows, it want to use a Czech locale which your script doesn't have.
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 5.13.3 Sophia {3DObjects, ActiveHours, AdminApprovalMode, Adver…
Script 3.0.1 PolicyFileEditor {Get-PolicyFileEntry, Remove-PolicyFileEntry, Set…
Import-LocalizedData: C:\censored_path\Sophia Script for Windows 10 PowerShell 7 v5.13.3\sophia_mine.ps1:25
Line |
25 | Import-LocalizedData -BindingVariable Global:Localization -FileName S …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot find the PowerShell data file 'Sophia.psd1' in directory 'C:\censored_path\Sophia Script for Windows 10 PowerShell 7
| v5.13.3\Localizations\cs-CZ', or in any parent culture directories.
InvalidOperation: The variable '$Localization' cannot be retrieved because it has not been set.
RegistrationState : 3
ServiceID : 7971f918-a847-4430-9279-4a52d1efe18d
IsPendingRegistrationWithAU : False
Service : System.__ComObject
ReturnValue : 0
PSComputerName :
Be default it should import en_US localization if there is no cz_CZ. Did you try version for PS 5.1? It really works faster. Anyway, let me check everything.
yeah, there is such bug in PS 7. I'm tired of maintaining it... Really, user the version for 5.1. There is no any benefits of using PS 7 version at all.
Replace this string https://github.com/farag2/Sophia-Script-for-Windows/blob/2b846a42fd634f7a1e25a057f89310bb2cdb947d/Sophia%20Script/Sophia%20Script%20for%20Windows%2010/Sophia.ps1#L85 with
Import-LocalizedData -BindingVariable Global:Localization -UICulture en-US -BaseDirectory $PSScriptRoot\Localizations -FileName Sophia
It will fix your bug.