Maky Doz
Maky Doz

Reputation: 1

Check current language in Codeigniter

Would you please help me how to implement the below code in codeignitor ( In View Files )

If(Language = "English "){
echo " 1 " ;
}
else{
Echo " 2 ";
|

Because I want to use the conditions to load some files for each language on the website such as CSS and other files.

I appreciate your help.

Upvotes: 0

Views: 1067

Answers (1)

Kamlesh Paul
Kamlesh Paul

Reputation: 12391

If( $this->session->userdata('language') == "English "){
echo " 1 " ;
}
else{
Echo " 2 ";
|

it's return application current language

https://codeigniter.com/user_guide/libraries/language.html

Upvotes: 2

Related Questions