ramesh
ramesh

Reputation: 4082

Joomla component for multiple language

In one of my multi language website, there is a custom component. In which we can create "CategorY" and products under category.

It has been implemented in the backend and front end and its working fine in english.

But my client need same component in the "arabic" ( which is my second language). Is there any simple way to do this. Now in arabic session also "english" is showing.

Best of my knowledge, We can take 2 inputs from the backend. like title_english, title_arabic and show accordingly. So my table looks like

id    |    title_arabic      |      english_title
------+----------------------+----------------------
1     |   title in arabic    |    English title
------+----------------------+----------------------
2     |   title in arabic    |    English title
------+----------------------+----------------------
3     |   title in arabic    |    English title
------+----------------------+----------------------
4     |   title in arabic    |    English title
------+----------------------+----------------------
5     |   title in arabic    |    English title
------+----------------------+----------------------
6     |   title in arabic    |    English title
------+----------------------+----------------------

My question is is there any wat to differentiate the language in the front end and show the title accordingly ? something like

if($language=="english")
    echo $item->english_title;
else 
    echo $item->title_arabic;

Please help Thanks for advance

Upvotes: 0

Views: 640

Answers (1)

Related Questions