How it works...

It goes without saying that translation can be a tricky beast, especially when managing encoding and when producing results that make sense at the human language level. Furthermore, even a slight change in the value within the script can break the PO file and the resulting script will not be fully translated (sometimes, not even at all). 

Take care not to break the keys when making modifications to the scripts at a later date.
  1. Step one is fairly straightforward—you just create a script. If you run the script, you will see purely an English result, but at least the plural and non-plural output is correct. Notice . gettext.sh; this line preps gettext to prepare and to be ran for internationalization/localization. In the script, ...

Get Bash Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.