Great, so you have this awesome script, but it's written in standard English and you would like to target those nice people who speak other languages. In some countries like Canada, they (we) have two official languages: English and French. Sometimes, the dual-language component is enforced with legislature and localized language laws.
To get around this, let's imagine a scenario where you are an individual who has written a script that prints out specific strings, but in English first. He/she wishes to have all of the strings inside of variables so that they can be swapped in and out dynamically using system language variables. Here are the basics:
- Create a shell script that utilizes gettext and sets the appropriate variables
- Build a po file that contains the necessary language definitions
- Install your output language localization file for your script
- Run your script with a language that's different than the one you originally...