Reputation: 4082
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
Reputation: 45124
You can find it in the below URLs
http://multilingual-joomla-demo.cloudaccess.net/
http://docs.joomla.org/Adding_multi-language_support
http://cool-tricks.net/create-a-joomla-multilanguage-website/
Upvotes: 2