How should I add multi language support to my web app across PHP, JS and Template Files?
Posted
by Camsoft
on Stack Overflow
See other posts from Stack Overflow
or by Camsoft
Published on 2010-04-19T10:47:21Z
Indexed on
2010/04/19
11:23 UTC
Read the original article
Hit count: 305
I'm building a website that needs to support different language translations. I have strings in PHP, JavaScript and Smarty Template files that need to translated.
I want to use something like PHP's gettext() function and have a single language file for each locale.
This is easy when the translatable strings are in the PHP files but I also have text in the Smarty Templates and JavaScript files that also need to be translated.
I really want one single file that holds all the translatable strings.
What is the best way to achieve this?
© Stack Overflow or respective owner