You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 64 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - different styles.css for each language [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
CenCer
Nuke Soldier
Nuke Soldier


Joined: Nov 21, 2003
Posts: 13


PostPosted: Sat May 20, 2006 1:02 am Reply with quoteBack to top

Hi every one,
Is it possible to have different styles for each language?
If yes then how can I do that..
Please help
Find all posts by CenCerView user's profileSend private messageVisit poster's website
spottedhog
Captain
Captain


Joined: Apr 30, 2004
Posts: 566


PostPosted: Sat May 20, 2006 2:02 am Reply with quoteBack to top

ok..... first of all.... What is your intended end result?

You can create multiple style.css files with each having a unique name. Then the user can choose the style from their browser.... like from Firefox for example.

_________________
SMF-Nuke admin

SMF and PHP Nuke integration is ready! Take a look at it by clicking on the link above.
Find all posts by spottedhogView user's profileSend private messageSend e-mailVisit poster's website
CenCer
Nuke Soldier
Nuke Soldier


Joined: Nov 21, 2003
Posts: 13


PostPosted: Sat May 20, 2006 2:59 am Reply with quoteBack to top

My site uses two different languages, one in kurdish(latin char) and the other one is in Farsi, which is like the arabic characters.

My style.css using the same font, Tahoma for both languages.
Tahoma is good for the Farsi but not for the kurdish part. I want to use Verdana for this part.
How can I use Verdana in the kurdish part of the site and Tahoma in the Farsi part. That is my problem.
I maybe need to use two different style.css but how should I make header.php to understand that there is another style.css when changing the language?
Find all posts by CenCerView user's profileSend private messageVisit poster's website
spottedhog
Captain
Captain


Joined: Apr 30, 2004
Posts: 566


PostPosted: Sat May 20, 2006 3:29 am Reply with quoteBack to top

Hi,

I am not sure if this would work, but in my fuzzy head this morning I think it just may work....

Create another style.css and rename it to farsi.css for example, and put it in the theme's style folder.

In the header.php file put $language in the globals.

Then below that where it echo's the stylesheet, replace it with:

Code:
if ($language == "farsi") {
    echo "<link rel=\"StyleSheet\" href=\"themes/$ThemeSel/style/farsi.css\" type=\"text/css\">\n\n\n";

} else {
    echo "<link rel=\"StyleSheet\" href=\"themes/$ThemeSel/style/style.css\" type=\"text/css\">\n\n\n";
}


Maybe someone else has a better way.....

_________________
SMF-Nuke admin

SMF and PHP Nuke integration is ready! Take a look at it by clicking on the link above.
Find all posts by spottedhogView user's profileSend private messageSend e-mailVisit poster's website
CenCer
Nuke Soldier
Nuke Soldier


Joined: Nov 21, 2003
Posts: 13


PostPosted: Sat May 20, 2006 4:08 am Reply with quoteBack to top

thanks a lot...
I did everything above but the result is negative Sad
It should work but It uses still the same style.css for both languages
Find all posts by CenCerView user's profileSend private messageVisit poster's website
spottedhog
Captain
Captain


Joined: Apr 30, 2004
Posts: 566


PostPosted: Sat May 20, 2006 8:32 am Reply with quoteBack to top

Did you put $language in the globals line?

_________________
SMF-Nuke admin

SMF and PHP Nuke integration is ready! Take a look at it by clicking on the link above.
Find all posts by spottedhogView user's profileSend private messageSend e-mailVisit poster's website
CenCer
Nuke Soldier
Nuke Soldier


Joined: Nov 21, 2003
Posts: 13


PostPosted: Sat May 20, 2006 10:28 am Reply with quoteBack to top

yes I did.

Code:
function head() {
    global $ab_config, $slogan, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle, $loading, $language;
Find all posts by CenCerView user's profileSend private messageVisit poster's website
webjunky
Lieutenant
Lieutenant


Joined: May 11, 2003
Posts: 167


PostPosted: Sat May 20, 2006 11:27 am Reply with quoteBack to top

function head() {
global $slogan, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle, $currentlang;
@include("includes/ipban.php");
$ThemeSel = get_theme();
@include("themes/$ThemeSel/theme.php");
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
echo "<html>\n";
echo "<head>\n";
echo "<title>$sitename $pagetitle</title>\n";
@include("includes/meta.php");
@include("includes/javascript.php");

if (file_exists("themes/$ThemeSel/images/favicon.ico")) {
echo "<link REL=\"shortcut icon\" HREF=\"themes/$ThemeSel/images/favicon.ico\" TYPE=\"image/x-icon\">\n";
}
echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"backend.php\">\n";
echo "<LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/style_$currentlang.css\" TYPE=\"text/css\">\n\n\n";
if (file_exists("includes/custom_files/custom_head.php")) {
@include_once("includes/custom_files/custom_head.php");
}
echo "\n\n\n</head>\n\n";
if (file_exists("includes/custom_files/custom_header.php")) {
@include_once("includes/custom_files/custom_header.php");
}
themeheader();
}


file should be style_english.css

_________________
- Do not pm me for help -
Find all posts by webjunkyView user's profileSend private message
CenCer
Nuke Soldier
Nuke Soldier


Joined: Nov 21, 2003
Posts: 13


PostPosted: Sat May 20, 2006 12:06 pm Reply with quoteBack to top

Thanks all, it works!! Smile

I really appreciates your help and quick replies
May the force be with you
Razz Laughing
Find all posts by CenCerView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.200 Seconds - 238 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::