The SitePoint PHP blog has posted a tutorial from Younes Rafie that wants to help demystify internationalization functionality in your PHP application...with the help from a handy extension, the intl extension.
Most applications perform locale aware operations like working with texts, dates, timezones, etc. The PHP Intl extension provides a good API for accessing the widely known ICU library’s functions.
He walks you through the installation of the extension if you don't have it already for both PHP 5 and PHP 7 (the second requires adding a custom apt-get repository). With that all installed and configured he starts in on the code to output a simple message with formatting using the MessageFormat functionality. His first example is in English but he also shows the difference between that and Arabic and Bengali and they're related output. He looks at a few other topics including pluralization, "choices" (different messages for different values) and more complex cases. He ends the post briefly looking at message parsing - extracting a value according to the provided format.