Skip to content

Commit

Permalink
Update -UICulture behavior for 7.4-p4 (#10159)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdwheeler committed Jun 12, 2023
1 parent 12b74e1 commit b7059b1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
14 changes: 8 additions & 6 deletions reference/7.4/Microsoft.PowerShell.Core/Save-Help.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: System.Management.Automation.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Core
ms.date: 12/09/2022
ms.date: 06/09/2023
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/save-help?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Save-Help
Expand Down Expand Up @@ -398,13 +398,15 @@ Accept wildcard characters: False

Specifies UI culture values for which this cmdlet gets updated help files. Enter one or more
language codes, such as `es-ES`, a variable that contains culture objects, or a command that gets
culture objects, such as a `Get-Culture` or `Get-UICulture` command.
culture objects, such as a `Get-Culture` or `Get-UICulture` command. Wildcard characters are not
permitted.

Wildcard characters are not permitted. Do not specify a partial language code, such as "de".
By default, `Save-Help` gets help files in the UI culture set for the operating system or its
fallback culture. If you specify the **UICulture** parameter, `Save-Help` only looks for help for
the specified language.

By default, `Save-Help` gets help files in the UI culture set for Windows or its fallback culture.
If you specify the **UICulture** parameter, `Save-Help` looks for help only for the specified UI
culture, not in any fallback culture.
Beginning in PowerShell 7.4-preview.4, you can use a partial language code, such as `en` to download
help in English for any region.

```yaml
Type: System.Globalization.CultureInfo[]
Expand Down
22 changes: 11 additions & 11 deletions reference/7.4/Microsoft.PowerShell.Core/Update-Help.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: System.Management.Automation.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Core
ms.date: 01/05/2023
ms.date: 06/09/2023
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/update-help?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Update-Help
Expand Down Expand Up @@ -463,23 +463,23 @@ Accept wildcard characters: False

### -UICulture

Specifies UI culture values that `Update-Help` uses to get updated help files. Enter one or more
language codes, such as **es-ES**, a variable containing culture objects, or a command that gets
culture objects, such as a `Get-Culture` or `Get-UICulture` command. Wildcard characters aren't
permitted and you can't submit a partial language code, such as **de**.
Specifies UI culture values for which this cmdlet gets updated help files. Enter one or more
language codes, such as `es-ES`, a variable that contains culture objects, or a command that gets
culture objects, such as a `Get-Culture` or `Get-UICulture` command. Wildcard characters are not
permitted.

By default, `Update-Help` gets help files in the UI culture set for the operating system. If you
specify the **UICulture** parameter, `Update-Help` looks for help only for the specified UI culture.
By default, `Update-Help` gets help files in the UI culture set for the operating system or its
fallback culture. If you specify the **UICulture** parameter, `Update-Help` only looks for help for
the specified language.

Beginning in PowerShell 7.4-preview.4, you can use a partial language code, such as `en` to download
help in English for any region.

> [!NOTE]
> Ubuntu 18.04 changed the default locale setting to `C.UTF.8`, which isn't a recognized UI
> culture. `Update-Help` silently fails to download help unless you use this parameter with a
> supported locale like `en-US`. This could occur on any platform that uses an unsupported value.

Commands that use the **UICulture** parameter succeed only when the module provides help files for
the specified UI culture. If the command fails because the specified UI culture isn't supported, an
error message is displayed.

```yaml
Type: System.Globalization.CultureInfo[]
Parameter Sets: (All)
Expand Down

0 comments on commit b7059b1

Please sign in to comment.