i18n / l10n commands

  • Check a .po file:
    msgfmt -c -v -o /dev/null file.po
    
  • Wipe out a .po file and keep only translated messages:
    msgattrib --translated -o cleaned.po messy.po
    
  • Delete duplicate messages in a .po file:
    msguniq -o no_duplicate.po duplicate_content.po
    
  • Show differences between two .po files (thanks to Jérome !):
    msgcat -u file1.po file2.po > diff.po
    
  • Generate a .mo file from a .po file:
    msgfmt -o target.mo source.po
    
  • If you want to have command-line tools use raw string instead of localized ones, add the following directives to your ~/.bash_profile:
    export LANGUAGE=C
    export LANG=C
    export LC_MESSAGES=C
    

One thought on “i18n / l10n commands

  1. Pingback: All my command lines | Kevin Deldycke

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>