Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

complete example of gettext in php

i've been googling for the last hour or so trying to find a complete working example of gettext in php - all source files, po files, with proper paths, etc. Just a "hello world" with all the required files.

I was wondering if anybody has such a working example. thanks in advance.

like image 546
Sherif Buzz Avatar asked Oct 31 '10 10:10

Sherif Buzz


People also ask

What is localization PHP?

Localization in software engineering is the process of adapting the content of a system to a particular locale so the target audience in that locale can understand it. It is not just about changing content from one language to another.


2 Answers

I've read these other guides posted for this question, but none of them was complete enough for me and also they seem to be rushing into the subject.

THIS GUIDE is divided in many parts, you'll learn from a simple Hello World to a complex plural management. It not just explain what every function does, but also the values used for these functions.

As a bonus, this guide teaches how to use Poedit which is a very helpful toll for working with gettext internationalization and a must have if you are dealing with a huge project.

The OP may change the accepted answer to this one if he also think that guide is better. So this answer can get more attention and more gettext beginners like me can be helped.

like image 151
kbtz Avatar answered Sep 19 '22 20:09

kbtz


There is an outstanding five part tutorial at Sitepoint.com called Localizing PHP Applications “The Right Way”. I highly recommend reviewing all five parts!

like image 42
Jabari Avatar answered Sep 20 '22 20:09

Jabari