Link Language With Specified CSS

Hello,

Now i have two languages on my site

en(English) + ar(Arabic)

and i have fully translated all things and all things works perfectly


and translated Orca Forums

and Works More Perfect

but the issue is

when i use arabic in dolphin main pages (Menus + SubMenus + Block Headers + and Every Thing) Still in LTR(Left to Right)

and i want to change the directions of all things from ltr to rtl.

and i did this thing in orca forums as well as i want because orca use different templates for each language

but main dolphin system don't use this thing as orca.

so how can i make this thing in dolphin ?

please help me argent.

And Many Thanks in advanced.......

Quote · 29 Mar 2010

Hey Please Help me :(

Quote · 30 Mar 2010

Please I want some help here

any one can help me or what ?

Quote · 2 Apr 2010

Do you mean to have the menus and blocks display from the right, instead of left? If so, this requires editing certain CSS files. I'll try to provide a list of the files and needed changes for you, now.

Block Headers

Edit the general.css file found under ./templates/tmpl_uni/css/; look for the following:

.boxFirstHeader
{
height:17px;
padding:3px 0px 0px 8px ;
font-size:12px;
font-weight:bold;
color:#666;
text-align:left;
text-transform:uppercase; 
border-bottom: 1px solid #CCC;
}

Change it to this:

.boxFirstHeader
{
height:17px;
padding:3px 0px 0px 8px ;
font-size:12px;
font-weight:bold;
color:#666;
text-align:right;
text-transform:uppercase; 
border-bottom: 1px solid #CCC;
}

The needed change has been provided in red.

Submenu

Edit the general.css file found under ./templates/tmpl_uni/css/; look for the following:

.subMenu {
background-image:url(../images/h_menu_bg.png);
background-repeat:repeat-x;
height:57px;
padding-top:8px;
/*padding-left: 14px;*/
font-weight: bold;
background-color: white;
position: absolute;
top: 0px;
/*width: 946px;*/
width: 100%;
}

Change it to this:

.subMenu {
background-image:url(../images/h_menu_bg.png);
background-repeat:repeat-x;
height:57px;
padding-top:8px;
/*padding-left: 14px;*/
text-align: right;
font-weight: bold;
background-color: white;
position: absolute;
top: 0px;
/*width: 946px;*/
width: 100%;
}

The needed change has been provided in red.

I'm not sure of what else I'd need to edit, so if you have anywhere else you'd like modified, let me know. Also, it should be noted that you cannot modify the template to correspond with only one language file. To make the changed you require, this must be done in a way that does not rely on which language is selected.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 3 Apr 2010

Also, it should be noted that you cannot modify the template to correspond with only one language file. To make the changed you require, this must be done in a way that does not rely on which language is selected.

Just curious.  it seems that template mods are all variations based on the uni template.  To do what he requires, is there a way to set up two templates, one with the language from the left and the other from the right, and the user then changes templates to match the language file?  Or does the fact that templates are based on uni prevent this?  Maybe this is a fix Boonex would consider in 7.1.  After all, it would serve the native languages of a large portion of the world's population.

Someday, Someway.
Quote · 3 Apr 2010

Thanks for reply brothers

but i know how to change from left to righ

and i made this in orca forums in the arabic templates, orca uses templates for each language, one for english and another for arabic so it's very good in orca.

but dolphin main system don't use this thing as orca, it's uses same template for any language.


and sorry i didn't understand your words Mr.124c41plus

if u can explain your words in easy sentence please.


and thanks a lot.

Quote · 3 Apr 2010

I hope I can explain my idea simply.  Dolphin comes with a basic template - UNI.  I am not a programmer, but it seems that template mods are variations of the UNI template.  What I am suggesting, IF IT IS POSSIBLE, is to have two templates for your users, one if the language is English, one if it is Arabic.  Each template would be set up for that language.  This seems to be what you did for Orca.  The problem for Dolphin would be if the change for text direction can only be made in the UNI template, not the template mod.  A programmer could answer that.  Maybe there is a work-around.

I think what you ask for is a useful feature that a mod developer might be willing to help you with.  I'd like to know myself if it can be done.  Boonex should consider it in a future version to serve the large Arabic community.  Other direction options would be useful for Asian languages.


Good luck with your site.  I hope I have given you some useful ideas to work with.

Someday, Someway.
Quote · 3 Apr 2010

The only way i can think of to do this, would be to create two separate templates..... one for LTR  and one for RTL.   Then create a top menu item that changes both the language and the template at the same time.

You could add two links to the top of your pages that do this:

http:yoursite.com?lang=en&skin=LTR

http:yoursite.com?lang=ar&skin=RTL

I think that will work.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 3 Apr 2010

I hope I can explain my idea simply.  Dolphin comes with a basic template - UNI.  I am not a programmer, but it seems that template mods are variations of the UNI template.  What I am suggesting, IF IT IS POSSIBLE, is to have two templates for your users, one if the language is English, one if it is Arabic.  Each template would be set up for that language.  This seems to be what you did for Orca.  The problem for Dolphin would be if the change for text direction can only be made in the UNI template, not the template mod.  A programmer could answer that.  Maybe there is a work-around.

I think what you ask for is a useful feature that a mod developer might be willing to help you with.  I'd like to know myself if it can be done.  Boonex should consider it in a future version to serve the large Arabic community.  Other direction options would be useful for Asian languages.


Good luck with your site.  I hope I have given you some useful ideas to work with.

Thank you very much

and i know how to do this thing in mind and it's like what you have said in your reply.

Quote · 4 Apr 2010

The only way i can think of to do this, would be to create two separate templates..... one for LTR  and one for RTL.   Then create a top menu item that changes both the language and the template at the same time.

You could add two links to the top of your pages that do this:

http:yoursite.com?lang=en&skin=LTR

http:yoursite.com?lang=ar&skin=RTL

I think that will work.

yeah i think it will work good if the GET rule for skin as the one you said

but it will still one problem,

now site identify the visitor if he is arabic or english and make this automatic with the language default GET Rule (?lang=en)

i think it will be good if i can edit the GET Rule for language to include a skin with it's url.

it will be very good

Very thanks to you bro

and i hope to do this thing it will help many people in multilanguage sites like arabic, herbew, and some asian languages with English.

Quote · 4 Apr 2010

I was thinking you could add 2 icons to the top of your pages..... 1 or english, and 1 for arabic.

For example:

<div>
<img scr="english.jpg" href="http://yoursite.com?skin=LTR&lang=en">
<img src="arabic.jpg" href'"http://yoursite.com?skin=RTL&lang=ar">
</div>


You could add this to templates/base/_sub_header.html

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 4 Apr 2010

How about this...

Why not create a new language key - "css_language_file"

Then for each language make this the path to the css file - "http://yoursite.com/path/to/your/language/css.file"

Then simply replace the call for the css file with the language key tag "__css_language_file__"

/DM

Dolphin - Ajax Masturbation
Quote · 5 Apr 2010

How about this...

Why not create a new language key - "css_language_file"

Then for each language make this the path to the css file - "http://yoursite.com/path/to/your/language/css.file"

Then simply replace the call for the css file with the language key tag "__css_language_file__"

/DM

You're really Genius Guy

I will try this Thing.

thank you very much Dude

Quote · 5 Apr 2010

i just did what u told me D.M

but it can't call the language_key in _header.html file in base skin dir

please tell me how to call a lang_key in html file

Thanks in advanced bro..........


Quote · 9 Apr 2010

OK - I missed it with my last suggestion - It's not as straightforward as I thought.

Try this...

[Edit]

templates/templ_uni/BxTemplConfig.php

[Find]

$site['css_dir']    = "templates/tmpl_uni/css/";

[Change it to]

$site['css_dir']    = _t( '__css_language_file_path__');

Next, create the language keys for each language like this

For first language add a new key  __css_language_file_path__ and make the value templates/tmpl_uni/css/

For second language edit the key  __css_language_file_path__ and make the value templates/tmpl_uni/css2/

Copy contents of templates/tmpl_uni/css/ into templates/tmpl_uni/css2/

Edit css files as necessary - Should be good to go :)

You can repeat this for as many languages as you need.

/DM

Dolphin - Ajax Masturbation
Quote · 9 Apr 2010

OK - I missed it with my last suggestion - It's not as straightforward as I thought.

Try this...

[Edit]

templates/templ_uni/BxTemplConfig.php

[Find]

$site['css_dir']    = "templates/tmpl_uni/css/";

[Change it to]

$site['css_dir']    = _t( '__css_language_file_path__');

Next, create the language keys for each language like this

For first language add a new key  __css_language_file_path__ and make the value templates/tmpl_uni/css/

For second language edit the key  __css_language_file_path__ and make the value templates/tmpl_uni/css2/

Copy contents of templates/tmpl_uni/css/ into templates/tmpl_uni/css2/

Edit css files as necessary - Should be good to go :)

You can repeat this for as many languages as you need.

/DM

Yeah It's Working Very Very Good

Thanks Bro for Every thing

but it seems that Orca has some error with this method

Now i can't go to Orca it said :-

"Fatal error: Call to undefined function _t() in /home/helpmye1/public_html/templates/tmpl_uni/scripts/BxTemplConfig.php on line 42"

and this line contains the CSS Dir Call that we have changed

so how to fix this ?

and Thanks Again bro you are really good man ^.~ .......

Quote · 9 Apr 2010

This error is because orca language handling works a little differently from the main code - it doesn't use the _t() function to replace language elements.

The fix for the error is pretty easy - simply include languages.inc.php...

[EDIT]

/orca/index.php

[FIND]

require_once( './inc/header.inc.php' );

[ADD UNDERNEATH]

require_once( '../inc/languages.inc.php' );

This should do the trick

/DM

Dolphin - Ajax Masturbation
Quote · 12 Apr 2010

This error is because orca language handling works a little differently from the main code - it doesn't use the _t() function to replace language elements.

The fix for the error is pretty easy - simply include languages.inc.php...

[EDIT]

/orca/index.php

[FIND]

require_once( './inc/header.inc.php' );

[ADD UNDERNEATH]

require_once( '../inc/languages.inc.php' );

This should do the trick

/DM

Thaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaank You Very Much Bro....

It's Finally Works Like Charm....

Good Job and thanks for help

and i hope that BOONEX Include this option into Original Build of this great web script

Thanks again dude

Quote · 12 Apr 2010

hi yasserloft,

can you upload  the final scripts?

i want to use it too please.

Always remember that the future comes one day at a time.
Quote · 28 Jun 2012

 His last post was two years ago, very much doubt he will see this..

 

hi yasserloft,

can you upload  the final scripts?

i want to use it too please.

 

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 28 Jun 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.