kalloo
kalloo

Reputation: 130

How to add arabic and english language in codeigniter?

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

Answers (2)

user3300065
user3300065

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

Nish
Nish

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

Related Questions