• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating multilanguage site


I'm familiar with lang helper and lang library, but I was wondering if there is a better way to do this. I don't really like the fact, that my views are a bunch of html code containing nothing but variables.

Is there a solution where a view would contain actual text and the CI would recognize that text when loading the view and changed the text according to user language setting? I know I could create multiple versions of the same view (one for every language), but that would mean making changes to the same html code in multiple places, which is again a bad idea.

Thank you!

No I'm sorry, you get the idea perfectly. You either use variables in your views so it's all dynamic, or use more static views. Personaly I use dynamic views with almost the full english words/sentices put in the language helper function. That helps making the view file more readable.

You can try my library that uses PHP gttext may be it can help you

Follow me on Github, you may find interesting things!

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.