Skip to Content
PHP 7: Real World Application Development
book

PHP 7: Real World Application Development

by Doug Bierer, Altaf Hussain, Branko Ajzele
September 2016
Intermediate to advanced
1091 pages
21h 41m
English
Packt Publishing
Content preview from PHP 7: Real World Application Development

Handling translation without gettext

Translation is an important part of making your website accessible to an international customer base. One way this is accomplished it to use the PHP gettext functions, which are based on the GNU gettext operating system tools installed on the local server. gettext is well documented and well supported, but uses a legacy approach and has distinct disadvantages. Accordingly, in this recipe, we present an alternative approach to translation where you can build your own adapter.

Something important to recognize is that the programmatic translation tools available to PHP are primarily designed to provide limited translation of a word or phrase, referred to as the msgid (message ID). The translated equivalent is referred ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro PHP Programming

Pro PHP Programming

Peter MacIntyre, Brian Danchilla, Mladen Gogala
Learning PHP 7

Learning PHP 7

Antonio L Zapata (GBP)
Intermediate PHP

Intermediate PHP

Lorna Jane Mitchell
Mastering PHP 7

Mastering PHP 7

Branko Ajzele

Publisher Resources

ISBN: 9781787129009