![]() |
| English And Arabic Conversion |
I want. when people come on site with english keyword they redirect to
domain.com/en/
and when people come on site with arabic keyword they redirect to
domain.com/ar/
We need to work according to Google Language Code.
domain.com will redirect to domain.com/ar fully Arabic language for Arabic people
How to do it.

+ comments + 4 comments
I think so
$_SERVER['HTTP_ACCEPT_LANGUAGE']
can help us in this section.
I got solution here. May be this can help but I am not completely sure.
http://webmasters.stackexchange.com/questions/54320/htaccess-language-redirects-with-seo-friendly-urls
Auto Detect Language and Redirect User : this function can also work
http://stackoverflow.com/questions/17803702/auto-detect-language-and-redirect-user
but
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
header("location: ".$lang."/index.php");
this code will not work
because; like if I am arabic
so it will redirect me to
domain.com/ar/index.php
but if ar folder is not exist then what
?
it will redirect to 404 page
Nice write-up! Being able to write creatively is something not all of us are capable of. Count yourself blessed because you have a talent. Getting into the mood in writing does not have a set of rules to follow. ‘To each his own’ is what people say; however, a list of suggestions wouldn’t hurt.steps to writing a book
Post a Comment
Give your reviews about this blog. Leave your comments. What do you think about this post?
Comments Guidelines:
1) I love to read comments, but please avoid spam.
2) Like this blog, share your insights, and spread the word.
3) You can use basic HTML/xHTML tags.
4) All comments are DoFollow—please use the section professionally.
5) Kindly mention your name or brand below your comment.
6) Constructive suggestions for improvement are always welcome.
Thanks for visiting Samee Articles.
========================================
Best Regards,
Samee U. Feroz