Be careful when you first try gettext in PHP, it can be very unreliable/unpredictable because of different naming conventions.
MyApp.po vs MyApp.mo
PO is the human-readable and you perform the translation in here. MO is the binary file and it’s cached by Apache. Thus, you need to restart Apache (XAMPP) after each change to MyApp.po, then recompile it via “msgfmt MyApp.po -o MyApp.mo”. If you forgot to recompile, it won’t have any of the new modifications.
/MyApp/locale/vi_VN/LC_MESSAGES/MyApp.mo /MyApp/locale/da_DK/LC_MESSAGES/MyApp.mo /MyApp/locale/en_US/LC_MESSAGES/MyApp.mo