I spread the gospel of #CaptainHookPHP at #LonghornPHP this weekend. Lots of folks sounded really interested in checking it out after I mentioned it in my “Let’s Build A Composer Package” workshop.

Slides are here: https://speakerdeck.com/ramsey/lets-build-a-composer-package-longhorn-php-2023

If you attended, please leave feedback here: https://joind.in/event/longhorn-php-conference-2023/lets-build-a-composer-package

Thank you to everyone who attended! #PHP

Let's Build a Composer Package (Longhorn PHP 2023)

You've downloaded and installed open source libraries, required them as Composer dependencies, and perused the source code of countless GitHub repositories. Now, you're ready to help others by creating your own Composer package. So, what does it take to build and publish an open source library? In this session, we'll take a look at some of the common patterns open source PHP libraries follow. Along the way, we'll cover: evaluating libraries for quality, common directory structures, the importance of tests and how to run them on GitHub Actions, publishing to Packagist, choosing a license, interacting with a community, and more. By the end of this workshop, you will have all the tools you need to publish and distribute your own Composer package.

Speaker Deck

And the slides for my “Internationalization and Localization With PHP” #LonghornPHP talk are here: https://speakerdeck.com/ramsey/internationalization-and-localization-with-php-longhorn-php-2023

I covered #FormatPHP and #FormatJS in this talk.

If you attended or watched the stream, please leave feedback here: https://joind.in/event/longhorn-php-conference-2023/internationalization--localization-with-php

Thanks!

#PHP

Internationalization & Localization With PHP (Longhorn PHP 2023)

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.

Speaker Deck

Thank you to all the sponsors of #LonghornPHP!

Many thanks to @editor, @zend, Ziff Davis, Follow Up Boss, Ring Central Developers, @sensiolabs, Civo, Geocodio, Nomad PHP, @omnicolor, Remote Dev Force, Zeek, JetBrains, PHP Town Hall, and @phpstan.

Y’all make it all possible. Thank you!

(If you work for these companies, and they don’t have a Fediverse presence yet, convince them to get one. 😁)

#PHP

@ramsey Is there any record available?
@skobkin For the internationalization one, yes. @longhorn and @ian have my permission to post it to YouTube, so it should be there in the future. The tutorials were not recorded.
@ramsey Looks great! I like the logical, object-oriented approach, but can imagine it being difficult to integrate into templating systems. Is there already an integration for Twig, Blade, or simply Phtml somewhere?
@tobiaskoengeter There aren’t any integrations I’m aware of, though creating a Twig extension would not involve a lot of work. I don’t know much about Blade. The hard part would be extracting the strings.
@ramsey It's always easy at the beginning and then becomes difficult in the details. 😄 I really hope someone else finds time for this — we're at full capacity with our libraries.