Jump to content

webiste in two languages?


phpmady

Recommended Posts

Hi,

 

I have build my CMS admin panel with two languages, for example adding seperate content for english and arabic.

 

for example in the table news

 

ID  Language  News_Title      News_Content        status

 

1  ENGLISH    Obama Wins    asfdsfsdaf              1

2  Arabic          News in arbic  arabic in News        2

 

so i have data with two languages...

 

Now i am very confused how to develop my cms regarding front end.

 

Initially i thought to develop my cms with 2 subdirectories ENGLISH and ARABIC, but i saw little difficulties in that, when am changing i want to make changes in another directory also, and if the language extends for french etc..it will be too tedious to meaintain i think so.

 

So I am looking for my seniors suggestion in this situation. I belive i wl get.

 

Thanks

 

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

hi

I do not think this is a smart design. Adding contents in different languages is not (mostly) practical.

However, if you really determined to your concept you can do the following:

Language Table

ID Language

1 English

2 Arabic

3 French

 

Content Table

id lang_id content

1 2 Arabic content

2 2 Arabic Content

3 3 French content

4 5 content in another language

5 1 English content

 

etc ...

 

You can design a select menu that you can choose which language the contents belong to.

 

Link to comment
Share on other sites

Hi,

 

Regarding front end, i have the doubts, also i saw your do it yourself cms, very good work,

 

Thanks,

 

 

 

 

hi

I do not think this is a smart design. Adding contents in different languages is not (mostly) practical.

However, if you really determined to your concept you can do the following:

Language Table

ID Language

1 English

2 Arabic

3 French

 

Content Table

id lang_id content

1 2 Arabic content

2 2 Arabic Content

3 3 French content

4 5 content in another language

5 1 English content

 

etc ...

 

You can design a select menu that you can choose which language the contents belong to.

Link to comment
Share on other sites

Hi,

 

As u said i dont like to do translations

 

Yes creating 2 diffrent websites means, cant i use one template system for both the languages?

 

 

 

thanks,

 

 

What do you want to achieve? Create 2 different websites (one in English and one in Arabic)? Or one website with translations? Your current db design only supports the former.

Link to comment
Share on other sites

Yes creating 2 diffrent websites means, cant i use one template system for both the languages?

 

A template has nothing to do with what I asked. By 2 websites you mean www.my-domain.top, www.my-domain2.top or just www.my-domain.top? Why these strange questions? Well, for example a visitor lands on your website (English version) but he speaks Arabic, so he selects Arabic but he wanted to read the article he got on the English version, no Arabic translation exists so he can't find the article.

 

This is where your db design is flawed you have no idea which article is a translation of another and thus confuses the reader. Basically it should be possible for me (I speak Dutch) to copy-paste an address to friends (who are Australian, Canadian, British, or American). For example I read an article that has an address like:

 

http://www.domain.top/some/article

 

When I view the website I get the Dutch version, however when I copy-paste it to any of my friends they get the English version (or French for Canadian). Wikipedia for example applies this (poorly, as you can hardly speak of a translation, it's an entire different article that happens to have the same subject).

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.