Welcome Guest, Not a member yet? Register   Sign In
What is the language folder in CI
#1

[eluser]WebMada[/eluser]
Hello!

I plan to set multilanguages my website: my current tactic is to create "en", "fr" folders in views directory but my client want to add 2 more languages "es", "de" so my tactic become hard and not good

So I wonder what is the role of the <b>language</b> directory in CI? Is multilingual already managed by CI?

Thanks in advance
#2

[eluser]tonanbarbarian[/eluser]
http://ellislab.com/codeigniter/user-gui...guage.html

you create folders in the language folder that contain your various language files
i.e.
languages/english/site.php
languages/french/site.php
languages/german/site.php

then in code you load the file and the particular language you need
Code:
$this->lang->load('site', 'english');
or
Code:
$this->lang->load('site', 'french');
or
Code:
$this->lang->load('site', 'german');
depending on which language you need
#3

[eluser]WebMada[/eluser]
Where is the location to call this load() function? In a hook?

In fact, how will look like the content of this site.php?




Theme © iAndrew 2016 - Forum software by © MyBB