Is gettext the best way to localise a website in php? I’m not using any frameworks, and there are not many words to translate, just two mildly different versions in English.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can just use a
lang_XX.phpand include it in your application.For other languages, say
lang_fr.php, just have something like:For a small use case, this should be fine and no need for going with
.pofiles. Also, you can define it this way: