Talk in English - US at CascadiaPHP 2024
Track Name:
Crater Lake
View Slides: https://speakerdeck.com/ramsey/internationalization-and-localization-with-php-cascadia-php-2023
Short URL: https://joind.in/talk/2286a
(QR-Code (opens in new window))
What’s today’s date? Is it 07/20/2023 or 20/07/2023? Or maybe it’s 2023/07/20? How many elePHPants do you want to buy? Is it 1,500 or 1.500? Will that be $30,000.00 or 30.000,00 $? We represent dates, times, numbers, and currency in a variety of ways, depending on where we are in the world, and writing software to accommodate these different formats can be scary. It’s worse when you find out you need to put these formatted values inside a translated string like, “Sign up before July 20th, and you’ll get 20% off the regular price of $30,000.” String concatenation and standard placeholders won’t work because different languages and regions follow different rules.
Fortunately, we have tools to make our jobs easier, and in this talk, we’ll take a look at FormatPHP and FormatJS, libraries designed to help with internationalization and localization of web applications. We’ll see how these libraries aid in formatting dates, times, numbers, and currency, as well as messages with plural conditions. We’ll learn how to format messages for translation, and by the end of this talk, you’ll know what a translation management system (TMS) is and how to extract strings from your application to send to your translators.
Comments
Please login to leave a comment
Really great talk, deep enough to make me think.
A great overview of all of the common mistakes that folks make when attempting to localize applications, offering practical solutions. Easy to follow, presented well, and super useful!
Thank you, Ben for this thorough description and introduction into FormatPHP (and FormatJS). This actually solves a problem I was struggling with in a project a few weeks ago. The "overtime" was definitely well spent! Thank you. The only question that was left unanswered for me was how to pass the strings to a translation agency that uses the XLIFF standard. But that is a technical detail that should be easy to solve!
So happy you shared FormatPHP! So much functionality in that package that I hope to make use of in the next year or so, perfect timing!
Great talk! it was especially insightful pointing out the differences of internationalization and localization and the challenges that come with each.