Skip to main content
Known Participant
September 13, 2018
Question

Menu to change languages, two flags, how?

  • September 13, 2018
  • 3 replies
  • 700 views

Hi! I have coded a website on dreamweaver (in french) , it's now fully working, but i would like to add a menu with two flags, one french and the other one for English that allow me to switch the language of the entire website when i click on them.

But I have no idea how to do that, does anyone know?

Have a nice day

This topic has been closed for replies.

3 replies

Legend
September 13, 2018

alexandram49722039  wrote

Hi! I have coded a website on dreamweaver (in french) , it's now fully working, but i would like to add a menu with two flags, one french and the other one for English that allow me to switch the language of the entire website when i click on them.

But I have no idea how to do that, does anyone know?

Have a nice day

Have you ot 2 seperate websites or just the one which pulls the language information from a database?

Known Participant
September 15, 2018

I have two separate websites

WolfShade
Legend
September 13, 2018

Is the content static, hard-coded?  If so, then you'll need to have separate folders/directories, one for FR, one for EN.  And as BenPleysier​ has stated, use a session variable to track which language is being used and which flag to display (I assume the US flag if the site is being browsed in French, and the flag of France if being browsed in English.)

If the content is being pulled from a database, then the only files that will be different would be header and footer files.  But, again, use session variables to keep track of which language the user is viewing.

V/r,

^ _ ^

Known Participant
September 15, 2018

It is hard coded, i have two separated websites, one in FR the other in EN

BenPleysier
Community Expert
Community Expert
September 13, 2018

I would set a session variable upon clicking a flag and if statements to display the language.

If there are only two languages involved, you could try using the ternary operator

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!