##########################
# HOWTO MAKE AN .mo FILE #
##########################
#update voiceone.pot file
find /var/www/voiceone* -name '*.php' | xargs xgettext -L PHP -o /var/www/voiceone/admin/public/lang/voiceone.pot --keyword=T_  --keyword=E_ --join-existing

#create a folder for the new locale for example it_IT locale)
cd /var/www/voiceone/admin/public/lang/
mkdir it_IT
mkdir it_IT/LC_MESSAGES

#Produce a new voiceone.po from voiceone.pot (for example it_IT locale)
cd /var/www/voiceone/admin/public/lang/it_IT/LC_MESSAGES/
msginit --locale=voiceone --input=/var/www/voiceone/admin/public/lang/voiceone.pot
...edit voiceone.po header: change charset filed as preferred (ISO-8859-1 for it locale)

#Update an existing voiceone.po file with the new labels (for example it_IT locale)
cd /var/www/voiceone/admin/public/lang/it_IT/LC_MESSAGES/
msginit --locale=voiceone --input=/var/www/voiceone/admin/public/lang/voiceone.pot --output=new.po
...edit new.po header: change charset filed according with voiceone.po charset (ISO-8859-1 for it locale)
msgmerge --output-file=voiceone.po --no-fuzzy-matching voiceone.po new.po
rm -f new.po

#Edit voiceone.po and translate labels
...edit po file in msgstr

#Compile voiceone.po in voiceone.mo
cd /var/www/voiceone/admin/public/lang/it_IT/LC_MESSAGES/
rm -f voiceone.mo
msgfmt -o voiceone.mo voiceone.po
chown www-data:www-data voiceone.mo
