Of course we know gettext. But gettext is less portable and less user-friendly, especially for users who use PHP only casually. That's also the reason why some of the largest PHP frameworks don't primarily use gettext for translations.
The solution here is pragmatic and works. You can measure performance, if you think this is really an issue.