Reputation: 133
How can we convert language of URL as website language changes?
Like take example of www.example.com/test
it is in English. When I am changing website language to Persian it should be www.example.com/آزمون
.
Is it possible? How can we achieve this?
Upvotes: 1
Views: 218
Reputation: 911
If you are using PHP, this may help. You can change the language
as you wish, depending on what language you want your website to be in.
/*
-----------------
Language: German
-----------------
*/
$lang = array();
$lang['PAGE_TITLE'] = 'Meine Webseite Titel';
$lang['HEADER_TITLE'] = 'Meine Website-Header Titel';
$lang['SITE_NAME'] = 'Meine Website';
$lang['SLOGAN'] = 'Mein Slogan hier';
$lang['HEADING'] = 'Position';
// Menu
$lang['MENU_HOME'] = 'Heim';
$lang['MENU_ABOUT_US'] = 'Über uns';
$lang['MENU_OUR_PRODUCTS'] = 'Unsere Produkte';
$lang['MENU_CONTACT_US'] = 'Kontaktieren Sie uns';
$lang['MENU_ADVERTISE'] = 'Werben';
$lang['MENU_SITE_MAP'] = 'Site Karte';
Also check out this thread.
Upvotes: 2