Title: Get-Culture and $PSCulture do not (consistently) reflect in-session changes to another culture · Issue #3831 · PowerShell/PowerShell · GitHub
Open Graph Title: Get-Culture and $PSCulture do not (consistently) reflect in-session changes to another culture · Issue #3831 · PowerShell/PowerShell
X Title: Get-Culture and $PSCulture do not (consistently) reflect in-session changes to another culture · Issue #3831 · PowerShell/PowerShell
Description: Note: Perhaps this is by design (although there's at least a buggy inconsistency), given that there's currently no PowerShell mechanism for in-session switching to another culture. If so, it should at least be documented. Steps to reprod...
Open Graph Description: Note: Perhaps this is by design (although there's at least a buggy inconsistency), given that there's currently no PowerShell mechanism for in-session switching to another culture. If so, it should...
X Description: Note: Perhaps this is by design (although there's at least a buggy inconsistency), given that there's currently no PowerShell mechanism for in-session switching to another culture. If so, i...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/3831
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Get-Culture and $PSCulture do not (consistently) reflect in-session changes to another culture","articleBody":"Note: Perhaps this is by design (although there's at least a buggy inconsistency), given that there's currently no _PowerShell_ mechanism for _in-session_ switching to another culture. If so, it should at least be documented.\r\n\r\nSteps to reproduce\r\n------------------\r\n\r\n```powershell\r\n[pscustomobject] @{ Test = 'initial'; Name = (Get-Culture).Name}\r\n[cultureinfo]::currentculture = 'fr-FR'; [pscustomobject] @{ Test = '$PSCulture'; Name =$PSCulture }, [pscustomobject] @{ Test = 'GetCulture'; Name = (Get-Culture).Name }, [pscustomobject] @{ Test = '$host.CurrentCulture'; Name = $host.CurrentCulture.Name }, [pscustomobject] @{ Test = '.NET'; Name = [cultureinfo]::currentculture.name }\r\n```\r\n\r\nNote: \r\n* If you try the above _interactively_, be sure to execute the 2nd line above _on a single line_.\r\n* The output below:\r\n * assumes that `en-US` is the initial culture at session startup time.\r\n * differs between PowerShell Core and Windows PowerShell: in Core, `Get-Culture` and `$host.CurrentCulture` reflect the switch, but `$PSCulture` doesn't, whereas in Windows PowerShell none of the PS cmdlets/properties do.\r\n\r\nExpected behavior\r\n-----------------\r\n\r\n\r\n```none\r\nTest Name \r\n---- ---- \r\ninitial en-US\r\n$PSCulture fr-FR\r\nGetCulture fr-FR\r\n$host.CurrentCulture fr-FR\r\n.NET fr-FR\r\n```\r\n\r\nActual behavior\r\n---------------\r\n\r\n* PowerShell Core: Windows, macOS, Ubuntu\r\n\r\n```none\r\nTest Name \r\n---- ---- \r\ninitial en-US\r\n$PSCulture en-US\r\nGetCulture fr-FR\r\n$host.CurrentCulture fr-FR\r\n.NET fr-FR\r\n```\r\n\r\n* Windows PowerShell 5.1\r\n\r\n```none\r\nTest Name \r\n---- ---- \r\ninitial en-US\r\n$PSCulture en-US\r\nGetCulture en-US\r\n$host.CurrentCulture en-US\r\n.NET fr-FR\r\n```\r\n\r\nEnvironment data\r\n----------------\r\n\r\n```powershell\r\nPowerShell Core v6.0.0-beta (v6.0.0-beta.1) on macOS 10.12.5\r\nPowerShell Core v6.0.0-beta (v6.0.0-beta.1) on Ubuntu 16.04.1 LTS\r\nPowerShell Core v6.0.0-beta (v6.0.0-beta.1) on Microsoft Windows 10 Pro (64-bit; v10.0.14393)\r\nWindows PowerShell v5.1.14393.1198 on Microsoft Windows 10 Pro (64-bit; v10.0.14393)\r\n```\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2017-05-20T16:44:13Z","url":"https://github.com/PowerShell/PowerShell/issues/3831"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:84d04afb-52d7-d318-6747-ff3d72f3c0c7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D2E0:F4A12:282CDF:35E3C4:6AFD35BC |
| html-safe-nonce | a62b22905f8b299ea98629f17a030f18d5bb0849a09945f2a49430c29b6a9f4a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkUwOkY0QTEyOjI4MkNERjozNUUzQzQ6NkFGRDM1QkMiLCJ2aXNpdG9yX2lkIjoiMzYwMjQ2MDc5NDA1NjE2MDcwMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b14203ccab1c0bb7e9e3c94d304b65fb5ecb9b447074077c449a32633bbfcd55 |
| hovercard-subject-tag | issue:230164902 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/3831/issue_layout |
| twitter:image | https://opengraph.githubassets.com/47695061810ac04a2aa6ad85fe8774cc84427edd38f5a5b226ef861dd50cbba5/PowerShell/PowerShell/issues/3831 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/47695061810ac04a2aa6ad85fe8774cc84427edd38f5a5b226ef861dd50cbba5/PowerShell/PowerShell/issues/3831 |
| og:image:alt | Note: Perhaps this is by design (although there's at least a buggy inconsistency), given that there's currently no PowerShell mechanism for in-session switching to another culture. If so, it should... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mklement0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 065128366c233a9d57ff68ab6c96e25b99dd1b0ab70d23b70873d3dd6b5e4f19 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 941021edf0c2ec58298f4a2c8f27ae507d129c92 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width