Reputation: 130
Iam working on codeignator website, where arabic and english languages are needed.Is it by using any language file? Can anyone help me out of this..
Thanks.
Upvotes: 2
Views: 2268
Reputation:
In the language file, you can copy the English folder, and rename is and the just follow the http://ellislab.com/codeigniter/user-guide/libraries/language.html
Also in the config/config.php you can set your default language. Very simple stuff.
Upvotes: 0
Reputation: 1137
Yes it is by using language file. When you want localization the text in the view should be retrieved from language file.
$this->lang->line('language_key');
In the language file you will have the actual message to the key.
$lang['language_key'] = "The actual message to be shown";
Then you need to load the proper language file.
$this->lang->load('filename', 'language');
filename : Name of the file inside the language folder. language: Folder name for the language
Upvotes: 1