phpmady Posted May 2, 2010 Share Posted May 2, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/200452-webiste-in-two-languages/ Share on other sites More sharing options...
khr2003 Posted May 2, 2010 Share Posted May 2, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/200452-webiste-in-two-languages/#findComment-1051916 Share on other sites More sharing options...
phpmady Posted May 2, 2010 Author Share Posted May 2, 2010 Hi, Yes u are rit, thats how i made in backend, but regarding the front end i have all the doubts. Thanks, Quote Link to comment https://forums.phpfreaks.com/topic/200452-webiste-in-two-languages/#findComment-1051926 Share on other sites More sharing options...
phpmady Posted May 2, 2010 Author Share Posted May 2, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/200452-webiste-in-two-languages/#findComment-1051966 Share on other sites More sharing options...
ignace Posted May 2, 2010 Share Posted May 2, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/200452-webiste-in-two-languages/#findComment-1052017 Share on other sites More sharing options...
phpmady Posted May 2, 2010 Author Share Posted May 2, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/200452-webiste-in-two-languages/#findComment-1052027 Share on other sites More sharing options...
ignace Posted May 2, 2010 Share Posted May 2, 2010 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). Quote Link to comment https://forums.phpfreaks.com/topic/200452-webiste-in-two-languages/#findComment-1052098 Share on other sites More sharing options...
squiblo Posted May 2, 2010 Share Posted May 2, 2010 http://www.youtube.com/user/phpacademy#p/u/5/Ph2s7bCN23Q Quote Link to comment https://forums.phpfreaks.com/topic/200452-webiste-in-two-languages/#findComment-1052129 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.