Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Template design and Front-End Code

Post Reply
 
Thread Tools
  #1  
Old 09-15-2008, 08:17 PM
MooseReiver Offline
forum loafer
 
Join Date: Sep 2008
Posts: 2
Exclamation Adding Languages with Flag Icons

I wanted to add small flag icons in the navigation section to switch between English and German. The template files are named like "about_DE_template.html". (I chose to use uppercase language codes.)

-Add flag icons to the language directory.

-In the navigation section of the templates, add:
<a href="?lang=DE" title="Deutsch"><img src="language/Deutsch.gif" border=0> </a>
<a href="?lang=EN" title="English"><img src="language/English.gif" border=0> </a>

-Since I used uppercase language codes, I had to edit line 181 to remove the strtolower() function:
$default_language_abr = $PP_supp_lang[$cfgrow['langfile']][0];

Now, by clicking on a flag, the language preference is quickly changed.

See it at: http://www.randalcarr.com/rc/photoblog/index.php
Reply With Quote
  #2  
Old 09-17-2008, 11:04 AM
Robbo Offline
pp regular
 
Join Date: May 2008
Location: Osnabrück
Posts: 25
Hi MooseReiver, not trying to be pedantic but Durchsuchen or Archiv Durchsuchen is better than brausen as it has nothing to do with browsing.
Reply With Quote
  #3  
Old 09-17-2008, 02:02 PM
MooseReiver Offline
forum loafer
 
Join Date: Sep 2008
Posts: 2
Danke

Thank you! It's been 25 years since I studied Deutsch. <blushes>
Reply With Quote
  #4  
Old 10-04-2008, 10:18 AM
jerome28 Offline
pp regular
 
Join Date: Aug 2007
Posts: 20
WHERE PUT THE IMAGE ( DEUTSCH.GIF and english.gif) ?
Reply With Quote
  #5  
Old 10-07-2008, 08:29 AM
austriaka's Avatar
austriaka+ Offline
Team Pixelpost
 
Join Date: Nov 2006
Location: Germany
Posts: 1,175
Send a message via ICQ to austriaka Send a message via AIM to austriaka
simplest way to show flags is to replace the wording by the image link in the appropriate language file:
$lang_alt_lang_english ="<img src=\"templates/en.gif\" border=\"0\" alt=\"English\" />";
__________________
Uh!log Photoblog
My Addons
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 10:59 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs