Jump to content

Making a website bilingual


ann86

Recommended Posts

Hello,

 

I am a working on a website and the client wants it bilingual English/Spanish. He wants to be able to put in his stories himself so I have a database where he will be able to type in his stories and it will display. How would I make it display in Spanish when he wants the site in Spanish?

 

 

P.S. Also I am a beginner in coding.

Link to comment
Share on other sites

You require a language table i.e.

 

language

=========

languageId

title

 

1 = english

2 = spanish

 

Your stories table

 

stories

=========

storyId

languageId

title

story

 

So the story needs to be entered in both languages. I would run a loop on the languages table so adding a new story requires entry of 2 titles and 2 text. When a user clicks to view the site in spanish then you could set a cookie to the languageId value i.e. 2. You then select the stories where languageId=2

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.