Jump to content


Photo

Language switcher


  • Please log in to reply
2 replies to this topic

#1 fazzfarrell

fazzfarrell
  • Members
  • PipPipPip
  • Advanced Member
  • 154 posts

Posted 26 September 2006 - 09:28 AM

I am trying to create a language switcher, I have the languages in a database that have an ID 'ENG' 'GER' etc. I want the default to be english and from a dropdown choose the other laungues

Any on help?

#2 steveclondon

steveclondon
  • Members
  • PipPipPip
  • Advanced Member
  • 161 posts

Posted 26 September 2006 - 09:58 AM

mmm need to give alot more information than that. If you have the database model done correctly that is the major part of this anyway. Which bit you stuck on

#3 fazzfarrell

fazzfarrell
  • Members
  • PipPipPip
  • Advanced Member
  • 154 posts

Posted 26 September 2006 - 10:16 AM

This is my database:

CREATE TABLE `langheaders` (
  `ID` int(11) NOT NULL auto_increment,
  `LangID` text NOT NULL,
  `Hed1` text NOT NULL,
  `Hed2` text NOT NULL,
  `Hed3` text NOT NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;

--
-- Dumping data for table `langheaders`
--

INSERT INTO `langheaders` (`ID`, `LangID`, `Hed1`, `Hed2`, `Hed3`) VALUES (1, 'ENG', '1. Select A Vehicle ', '2. Select A Model Year', '3. Select The Document Language'),
(2, 'DUT', '1. Selecteer een Voertuig ', '2. Selecteer een Taal ', '3. Selecteer een Modeljaar'),
(3, 'FRN', '1. Choisissez Un Véhicule ', '2. Choisissez Une Langue', '3. Choisissez Une Année Modèle'),
(4, 'GER', '1. Wählen Sie Einen Träger Vor ', '2. Wählen Sie Eine Sprache Vor', '3. Wählen Sie Ein Vorbildliches Jahr Vor'),
(5, 'ITA', '1. Selezioni Un Veicolo ', '2. Selezioni Una Lingua', '3. Selezioni Un Anno Di modello'),
(6, 'POR', '1. Selecione Um Veículo ', '2. Selecione Uma Língua', '3. Selecione Um Ano Modelo \r\n'),
(7, 'SPN', '1. Seleccione Un Vehículo ', '2. Seleccione Una Lengua', '3. Seleccione Un Año Modelo');


I have the english in the site at the moment. I have a link to a page with a drop down menu with the list of languages

English ENG
French FRN
German GER etc

When you chose your languge it goes back to the previous page, I want the page to default to the chosen language




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users