News:

Wondering if this will always be free?  See why free is better.

Main Menu

The Right to Left on this theme..

Started by ArabworD, July 31, 2008, 05:12:40 PM

Previous topic - Next topic

ArabworD

hi everybody...

i downloaded this theme from other website and i will used it for arabic language..
but all problems comes up.. i solved it else this problem..

when i change page encoding to "right to left" some of function working bad..
and the table row will be bad...

see the attchment to know what's i meaning
thanks for all

lordtron

Well that's most likely because it was not meant for right-to-left, it was meant for left-to-right.

VainSoftGames.com - New Design To Gaming

Deaks

there is a way to sort this but im not at home in meantime id advise searching
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Hoochie Coochie Man

Hi @ArabworD

It's my theme, also you can download it in here..
http://custom.simplemachines.org/themes/index.php?lemma=750

I'm sorry but I have no idea how you make the theme left-to-right :-\
İnadına SMF 1.1.X

Deaks

This is a post by Croco a while ago on how to make theme rtl .. i will see if he can contact you to help you more :)
Quote from: Croco
Hello,

The main difference between left-right and right-left languages is using the attribute dir="RTL" which  change the direction of the page.

What should we do when creating a theme that supports both directions ??

1-Do not use alignment attributes like to left or right (using the center one is permitted)
     We can simply delete them if the alignment is same as original text direction left for left-right languages and right for right-left languages
     if we have to use the alignment attribute then we will have to make sure to use the opposite one for RTL languages
     for example:
     
     ', $context['right_to_left'] ? ' align="left"' : 'align="right"', '
     


    or
     
     align="', $context['right_to_left'] ? 'left' : 'right', '"
     


     same thing applies to text-align, float and other directional and alignment attributes.

2- Do not use dir="RTL" to resolve any directional problems it should be used only once at the head scope in the "index.template.php" file.

3- Images (most difficult part):

     If we are using one piece images the direction of the page won't make any problems.
     However if we are using more, then it depends on the image's edge, for example, in my silver theme I have this border of 5 images:
     
     as you can see the previous border was nice but if we used it in RTL language page we would get this:

     
     when we should get this:

     
      so we have 2 main issue: the image direction(if it is sensitive to direction) and actual direction of all images together in the page.
      The actual direction is resolved by RTL attribute.
      Therefore, what we need to do is to flip horizontally every image that has direction(direction sensitive) and we can do it by using image editors like photoshop.
      The order of the images will be the same but we need to use different images.
      For example, first part of the border i had top_left.gif(for right-left languages) and top_lefte.gif(for left-right languages).
      They are 2 images and the difference is the last letter so what i did is this:
      <img src="top_left', $context['right_to_left'] ? '' : 'e', '.gif" />

      the technique doesn't matter we can use the language folders that are used for buttons so all the image names will be same but in different locations.
      However, this won't be effective because we actually have only 2 directions, so it is better to have different names like i did before.
      Or we could create 2 folders for directional images and use the same names with different locations which will be the best solution for this.

4- some themes has definition of left or right location when using the RTL attribute this definition will be changed so the left will become right and right will become left. Whcih probably it will be translation issue but every theme designer should be aware of this point.

If there is anything wrong or you have other suggestion please share them with me :)

Thank you for reading
Croco
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Croco

I am back. I will try to catch up with some stuff soon.
Regards,
Croco

My sites
Andareena.com
Andareen.net(Under Constraction :P)

New plans coming soon


Good links for you to visit:
Docs
Search

Rumbaar

When I installed the theme and set the alignment from RTL, it rendered correctly.  I didn't get the images not appearing correctly like you've gotten.  Though the main menu was back to front, text to images, instead of image to text.

How did you set it RTL?
via index.{language}.php
$txt['lang_rtl'] = true;
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

ArabworD

I'm sorry for late.. because i didn't have many time...

thanks for all...
i will try your ideas..



with best wishes

Rumbaar

Have you had any more luck with this ArabworD?  Though the design of the menus might be need to be adjusted at the code level for full support.  But you'd have to speak to the author on this (Hoochie Coochie Man), though it can be tricky to support the right to left of some languages.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

ArabworD

I have successfully arabization this theme...
all your reply showed me another solve for problem..

I tried it on FireFox3 without errors...
but when I tried it on IE7, some mistakes comes up...


when I finished it I will put it here
My sincere thanks to you..

Advertisement: