Skip to content

FriedrichWeinmann/LocalizedCompletion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Localized Completion

Welcome to the Proof of Concept module for localized Tab Completion in PowerShell.

Note: This module is still experimental. Things will change, bugs may exist, breaking changes are expected for future versions.

Installation

# PowerShell 7.4+
Install-PSResource LocalizedCompletion

# Otherwise
Install-Module Localizedcompletion -Scope CurrentUser

Profit

To register localization for a parameter, use this:

Register-LCLocalization -CommandName Get-ChildItem -ParameterName LiteralPath -ParameterListItem @{
  'de-de' = 'Wörtlicher Pfad'
} -ParameterTooltip @{
  'de-de' = 'Pfad ohne Wildcard Auswertung'
} -ParameterAlias @{
  'de-de' = 'WörtlicherPfad'
}

This will now provide customized tab completion for the LiteralPath parameter on a German console:

  • ParameterListItem: The way the parameter is being displayed in a tab menu
  • ParameterTooltip: The cyan tooltip for the parameter in a tab menu
  • ParameterAlias: Actual value inserted when completing (does NOT magically add that alias to the parameter on the command. The example above will not work in a regular PowerShell console)

Providing localization for a command itself:

Register-LCLocalization -CommandName Get-ChildItem -ListItem @{
  'de-de' = 'Lese-Kindobjekte'
} -Alias @{
  'de-de' = 'Lese-KindObjekt'
} -Tooltip @{
  'de-de' = 'Macht seltsame Dinge'
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published