whd
whd

Reputation: 1861

Convert localized path to the English

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?

Upvotes: 0

Views: 326

Answers (1)

postanote
postanote

Reputation: 16086

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

Upvotes: 1

Related Questions