Multilanguage constant files and inclusion |
[eluser]vigna[/eluser]
Hi ALL, I am working on a Multilanguage website using CodeIgniter and I am NEW to it. I had defined Language based constants in three files en.php for english etc.. What is the best/correct way to put the files and include them: 1. Where should I place these files (language constant files) 2. Where/How should I include them. Actually the language is passed thru the URL and based the value for e.g www.domain-name.com/contact_us/en I have to include the language file depending on the last value Thank you very much!
[eluser]xwero[/eluser]
Why not work with the CI language library? You shouldn't work with constants because they are inflexible. if your language string has a placeholder you have to assign the constant to a variable before you can replace the placeholder with the actual content.
|
Welcome Guest, Not a member yet? Register Sign In |