< Back

Import-PSFLocalizedString

Sun Jan 19, 2020 6:41 pm

NAME Import-PSFLocalizedString



SYNOPSIS

Imports a set of localized strings from a PowerShell data file.





SYNTAX

Import-PSFLocalizedString [-Path] <String> [-Module] <String> [[-Language] <String>] [<CommonParameters>]





DESCRIPTION

Imports a set of localized strings from a PowerShell data file.

This is used to feed the localized string feature set.

Always import for all languages, do not select by current language - the system handles language selection.



Strings are process wide, so loading additional languages can be offloaded into a background task.





PARAMETERS

-Path <String>

The path to the psd1 file to import as strings file.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Module <String>

The module for which to import the strings.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Language <String>

The language of the specific strings file.

Defaults to en-US.



Required? false

Position? 3

Default value en-US

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





This command is not safe to expose in a JEA endpoint.

In its need to maintain compatibility it allows for a path for arbitrary code execution.



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Import-PSFLocalizedString -Path '$moduleRoot\\strings.psd1' -Module 'MyModule'



Imports the strings stored in strings.psd1 for the module MyModule as 'en-US' language strings.











RELATED LINKS