Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Use the Import-LocalizedData cmdlet, shown in
Example 13-6.
Example 13-6. Importing culture-specific strings for a script or module
Set-StrictMode -Version Latest
## Create some default messages for English cultures, and
## when culture-specific messages are not available.
$messages = DATA {
@{
Greeting = "Hello, {0}"
Goodbye = "So long."
}
}
## Import localized messages for the current culture.
Import-LocalizedData messages -ErrorAction SilentlyContinue
## Output the localized messages
$messages.Greeting -f "World"
$messages.Goodbye