0

if user installs windows in his native language(not english) he can access files using localized paths ie. insted C:\Users\UserName\Desktop he can access Desktop using C:\LocalizedUsersName\LocalizedDesktopName Is there any Powershell command which can convert/translate local version of the Path to the English version?

whd
  • 1,819
  • 1
  • 21
  • 52

1 Answers1

1

There is nothing specifically for a path, yet, basically, along the same lines as you'd do this for other strings you are working with. See the discussions, examples, and answers below.

International Settings Cmdlets in Windows PowerShell

Using the Microsoft Translator API from PowerShell

Localization and PowerShell

plattsoft_PSUICultureExample

Forcing PowerShell errors output in English on localized systems

You can change the pipeline thread's CurrrentUICulture like so: [Threading.Thread]::CurrentThread.CurrentUICulture = 'fr-FR'; Get-Help Get-Process

I'm on an English system but before I executed the line above, I updated help like so: Update-Help -UICulture fr-FR

$ENUS="[Threading.Thread]::CurrentThread.CurrentUICulture = 'en-US'" then invoke-expression $ENUS; Get-Help Get-Process "invoke-expression $ENUS;" is little shorter if you need to run many commands

Community
  • 1
  • 1
postanote
  • 15,138
  • 2
  • 14
  • 25