O'Reilly logo

Learn PowerShell Toolmaking in a Month of Lunches by Don Jones and Jeffrey Hicks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

21.3. Storing translated strings

We need to set up some new text files and a directory structure to store the translated strings. Each text file will contain a copy of our data section. We’ll start by creating the following new directories and files:

  • \Documents\WindowsPowerShell\Modules\Tools\de-DE\Tools.psd1
  • \Documents\WindowsPowerShell\Modules\Tools\es\Tools.psd1

This creates two localized languages, German and Spanish. The es and de-DE, as well as the en-US used in our data section, are language codes defined by Microsoft. You have to use the correct codes, so be sure to consult the list at http://msdn.microsoft.com/en-us/library/ms533052(v=vs.85).aspx.

With the files created, we’re going to copy our ConvertFrom-StringData command ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required