You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
META: What are the features needed to improve PowerShell localization #19860
A common argument people use against using localized software is that it makes it harder to look up errors and I think that's a valid point. I think there are 2 changes that could be made to address this complaint:
A preference variable to set the desired language for errors (People may still want localized dates and numbers so it shouldn't just change the whole culture to the specified language).
A command to convert an error record to a different culture, like: Get-Error | Get-LocalizedError -TargetCulture en-US.
Some people may also want to run PowerShell in English but keep the OS localized but there's no easy way to change the culture on the fly. The following reflection code seems to do the trick but a proper command would be better:
Hi all, could you please share with me how I can get the DLL for other language resources in PowerShell.SDK ? I am using the powershell.sdk 7.2.0 for my c# program, Thanks.
A common argument people use against using localized software is that it makes it harder to look up errors and I think that's a valid point. I think there are 2 changes that could be made to address this complaint:
A preference variable to set the desired language for errors (People may still want localized dates and numbers so it shouldn't just change the whole culture to the specified language).
A command to convert an error record to a different culture, like: Get-Error | Get-LocalizedError -TargetCulture en-US.
Some people may also want to run PowerShell in English but keep the OS localized but there's no easy way to change the culture on the fly. The following reflection code seems to do the trick but a proper command would be better:
As you see, the error message contains original command, localized error message, and original error info in English, but it is too complex. In PowerShell7, the detaild error message was removed, but we can bring it back as this:
PS C:\Users\myname>Get-ChildItem ./missing -ErrorAction ContinueGet-ChildItem : 无法找到路径 'C:\Users\Jerry\myname' 因为路径不存在
Details:
+Get-ChildItem : Cannot find path 'C:\Users\myname\missing' because it does not exist.
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
In Visual Studio, errors , warings and more things was displayed in your system language, so when I ask something in Github or other non-Chinene community, I must translate my error into English. We actually need a better way to break the language barrier while making softwares localized.
Activity
MartinGC94 commentedon Jun 26, 2023
A common argument people use against using localized software is that it makes it harder to look up errors and I think that's a valid point. I think there are 2 changes that could be made to address this complaint:
Get-Error | Get-LocalizedError -TargetCulture en-US.Some people may also want to run PowerShell in English but keep the OS localized but there's no easy way to change the culture on the fly. The following reflection code seems to do the trick but a proper command would be better:
hyke123 commentedon Jan 23, 2024
Hi all, could you please share with me how I can get the DLL for other language resources in PowerShell.SDK ? I am using the powershell.sdk 7.2.0 for my c# program, Thanks.
virtual-panda commentedon Jun 21, 2026
That's a good idea. While localized error message displayed, we can drop a message in English, so that everyone can search and realize the error.
I think we can learn from WindowsPowerShell 5.1 .
in a Chinese environment, it will display:
As you see, the error message contains original command, localized error message, and original error info in English, but it is too complex. In PowerShell7, the detaild error message was removed, but we can bring it back as this:
In Visual Studio, errors , warings and more things was displayed in your system language, so when I ask something in Github or other non-Chinene community, I must translate my error into English. We actually need a better way to break the language barrier while making softwares localized.