several upper static website navbars per language

several upper static website navbars per language

Postby MartinTruckenbrodt » 23 Dec 2007, 22:54

Hello,
I'm sharing the Pipidae Forum for two websites. http://www.pipidae.de is german language and http://www.pipidae.net is english language. The board is under http://www.pipidae.org/cgi/phpBB3 . So I need to integrate two different navbars related to user_lang:

Installation:
1. create one XHTML 1.0 strict standard navbar per language. Call them:
phpbb_root/styles/prosilver/template/overall_navbar_de.html
phpbb_root/styles/prosilver/template/overall_navbar_en.html

More information - but use full URLs!!!: viewtopic.php?f=23&t=94 Step 1.

2. OPEN
phpbb_root/includes/functions.php
FIND
Code: Select all
		'T_STYLESHEET_NAME'		=> $user->theme['theme_name'],

AFTER, ADD
Code: Select all
		'L_DE'					=> ($user->data['user_lang'] == 'de') ? true : false,
		'L_EN'					=> ($user->data['user_lang'] == 'en') ? true : false,


3. OPEN
phpbb_root/includes/session.php
FIND
Code: Select all
		}

		// We include common language file here to not load it every time a custom language file is included

BEFORE, ADD
Code: Select all
			$this->data['user_lang'] = $this->lang_name;


4. OPEN
phpbb_root/styles/prosilver/template/overall_header.html
FIND
Code: Select all
<body id="phpbb" class="section-{SCRIPT_NAME} {S_CONTENT_DIRECTION}">


AFTER, ADD
Code: Select all
<!-- IF L_DE -->
	<!-- INCLUDE overall_navbar_de.html -->
<!-- ENDIF -->

<!-- IF L_EN -->
	<!-- INCLUDE overall_navbar_en.html -->
<!-- ENDIF -->



It's a dirty solution. But I don't know a more comfortable solution.

Bye Martin
MartinTruckenbrodt
Site Admin
 
Posts: 331
Joined: 14 Aug 2005, 16:28
Location: Germany - Souththuringia
first name: Martin

Re: several upper static website navbars per language

Postby panas » 10 Jul 2008, 23:53

Hello.
Can this navbar be used as the autodetect visitors browser language mod?
Under the same domain to change the language of the menu if installed?
panas
 

Re: several upper static website navbars per language

Postby MartinTruckenbrodt » 10 Jul 2008, 23:57

Hello,
yes.
Demo: http://www.pipidae.org/cgi/phpBB3 :)

Bye Martin
MartinTruckenbrodt
Site Admin
 
Posts: 331
Joined: 14 Aug 2005, 16:28
Location: Germany - Souththuringia
first name: Martin

Re: several upper static website navbars per language

Postby panas » 13 Jul 2008, 15:14

it works, we use the forum menu so we have
done a small change, no html page for the menu just a menu-en.ini with the following code,

Code: Select all
			<ul class="linklist navlinks">
							<li class="icon-home"><a href="/" title="first page" accesskey="n">#</a>	
<li class="icon-chat"><a href="{U_INDEX}"title="of our community" accesskey="h">forum</a>
<li class="icon-chat"><a href="#" title="bla bla"  accesskey="c">chat</a>
				<li class="icon-ucp"><a href="#">who we are</a>
				<li class="icon-bump"><a href="#" title="Photo gallery"  "accesskey="l">gallery</a>	
</li><li class="icon-members"><a href="#" accesskey="u">the team</a>
<li class="icon-faq"><a href="# "title="with us"  accesskey="m">contact</a>	
<li class="icon-bump"><a href="#" title="to other websites"  "accesskey="l">links</a>	
</li>
</ul>

More information - but use full URLs!!!: viewtopic.php?f=23&t=94 Step 1.

What do you mean?
We use relative paths and not full urls for the menus, is that a problem?

Has your auto language detect mod any diference with this method?
http://www.phpbb.com/community/viewtopi ... 1#p3171881
The bug on language buttons not changing (cache issue?) exist and in your mod.

Our forum greek (default), english.
Thanks.
panas
 

Re: several upper static website navbars per language

Postby MartinTruckenbrodt » 13 Jul 2008, 16:28

Hello panas,
the remarked original code in includes/session.php is not completed and not working well. So IMO it's very recommend to use my MOD.

If the realitive URLs are running it seems to be okay. :wink: To use full URLs makes it only easier to get it running in some scenarios.

Bye Martin
MartinTruckenbrodt
Site Admin
 
Posts: 331
Joined: 14 Aug 2005, 16:28
Location: Germany - Souththuringia
first name: Martin


Return to [HOW TO] Optimizing of multilanguage boards

Who is online

Users browsing this forum: No registered users and 1 guest

cron