addlang.sh

  1. #!/bin/bash
  2. set -x #echo on
  3.  
  4. # Add a new language
  5.  
  6. # Examples:
  7. # ./addlang.sh en_US
  8. # ./addlang.sh es_ES
  9. # ./addlang.sh ca_ES
  10.  
  11. LOCALE=$1
  12. LANG=`echo $LOCALE | cut -c1-2`
  13.  
  14. sudo apt-get install language-pack-$LANG-base
  15. mkdir -p $LOCALE/LC_MESSAGES
  16. msginit --no-translator --input=messages.pot --locale=$LOCALE.utf8 -o $LOCALE.po
  17.  
  18.  

Proinf.net