Multi language site and espacially menu with CMSMS

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
boyan08

Multi language site and espacially menu with CMSMS

Post by boyan08 »

Hi,

I have to create a website with cmsms with multi language support.
The Content structer has to be the same for all laguages and just to have aditional fields for every page which say "English text:" and for example "German text:" or something like this in the admin. In the frontend there will be a link switching between languages.

My problem now is that I dont know how to make a multi language menu. I mean different menu text for the different language versions.

Here is what i did so far till i realized i need also different menu texts for the differnet languages:

I added fields with content blocks in the template. Then I copied the index.php and called it index_english.php. So for every language version there is an index.php and an extra field on every page in "pages" in the admin. After that I surround the content blocks (the one for english and the one for german in my case) with user defined tags like this:

{start} - php checks the filename, and if its for example index_german.php it echos html start comment:

same thing for all other languages

Next step, language links. I added this to the template:

German Version
English Version

Everything worked great till I realized that the menus should also be translateable. Any ideas how to do this?
Is there a way of for example connecting two content blocks for two languages with the menu text field and display the value of just one of both at a time depending on the filename. Maybe something like that would be possible if you were allowed to use smarty tags in the menu field. Any idea how to do this?

Thanks and regards
boyan08

Re: Multi language site and espacially menu with CMSMS

Post by boyan08 »

found a solution
thanks anyway
Post Reply

Return to “Developers Discussion”