0

Hello every one,
This is my first article this this forum hope it will be much helpful for me and other also.
I'm gonna build a wordpress site with two languages English and Arabic. My Cliend doesn't want to be used some sort of plugins like qTranslate, Multilingual ets, to translate. because these plugins only replace text on same position, infact arabic start from right side and all the contents should be flipped to right..
If any body has an idea please share . Thanks in advance

Edited by engr_pir: Title mistake

5
Contributors
10
Replies
47
Views
4 Years
Discussion Span
Last Post by engr_pir
Featured Replies
  • 1
    cereal 1,524   4 Years Ago

    In addition to previous notes, the direction of the text depends on the HTML [`dir` attribute](http://www.w3.org/TR/html401/struct/dirlang.html#h-8.2), an example of multilanguage page: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>sample arabic language</title> </head> <body> <p lang="ar" dir="rtl">مرحبا</p> <p>hello</p> </body> </html> If your page is not mixed and you have only Arabic, … Read More

-1

to flip string in PHP, there is a PHP function called strrev . You can search it on google..

It should print the mirror image of any particular string..

something like this

Daniweb bewinaD

For the language characters, I believe wordpress is capable of storing characters of any language..

Votes + Comments
You can't use strrev for language translation
0

This function flips text on same postion but my need is to flip whole page when selecting arabic language because Arabic starts from right . And offcourse wordpress is capable of storing multilanguage characters, but i didn't work upon this multi-language functionalty last time have used qtranslate plugin but now translate plugins are not allowed........

0

Have you tried WP translate? I am using this plugin for my website and to me it's quite good.

1

In addition to previous notes, the direction of the text depends on the HTML dir attribute, an example of multilanguage page:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>sample arabic language</title>
</head>
<body>
    <p lang="ar" dir="rtl">مرحبا</p>
    <p>hello</p>
</body>
</html>

If your page is not mixed and you have only Arabic, then change it to:

<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
    <meta charset="utf-8">
    <title>sample arabic language</title>
</head>
<body>
    <p>مرحبا</p>
</body>
</html>

The rtl value stands for right-to-left. I don't know Wordpress, plus I don't know if you're using an uri segment to define the language in use, but it should be easy to set lang and dir attributes on the fly.

0

wow.. thanks dear it will be much helpfull. but i need to make language switcher and how can i place double text one in english and other in Arabic is it possible ?? .... will it noe be too much lengthy process

0

but i need to make language switcher and how can i place double text one in english and other in Arabic is it possible ??

Yes, you can do this in WP.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.