Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
hi,

I've been trying to follow this example:
viewtopic.php?p=330#p33

But when I click on language redirect button, en & ch, it showed blank page, all the test.php page have same content:

outer test.php:
Code: Select all
<?php require_once( 'admin/cms.php' ); ?>
   <cms:embed 'lang_getter.html' />
   <cms:template>
      <cms:editable name="photo" type="image" />
      <cms:editable name="content_en" type="textarea" />
      <cms:editable name="content_ch" type="textarea" />
   </cms:template>

   <cms:embed 'lang_switcher_menu.html' />

   <h1>Language Test</h1>
   <p> <img src="<cms:show photo />" /> </p>
   <cms:if my_lang='en'><cms:show content_en /></cms:if>
   <cms:if my_lang='ch'><cms:show content_ch /></cms:if>
   
   <!-- Alternate method of showing variable -->
   <br />
   <cms:get "content_<cms:show my_lang />" />
   
<?php COUCH::invoke(); ?>



insde the folder, test.php:
Code: Select all
<?php require_once( '../admin/cms.php' ); ?>
   <cms:embed 'lang_getter.html' />
   <cms:template>
      <cms:editable name="photo" type="image" />
      <cms:editable name="content_en" type="textarea" />
      <cms:editable name="content_ch" type="textarea" />
   </cms:template>

   <cms:embed 'lang_switcher_menu.html' />

   <h1>Language Test</h1>
   <p> <img src="<cms:show photo />" /> </p>
   <cms:if my_lang='en'><cms:show content_en /></cms:if>
   <cms:if my_lang='ch'><cms:show content_ch /></cms:if>
   
   <!-- Alternate method of showing variable -->
   <br />
   <cms:get "content_<cms:show my_lang />" />
   
<?php COUCH::invoke(); ?>


I trying to add masterpage, but it will show one language text. which part did I missed?

one more question, is it suitable for clone page? As I see one con "Likewise, comments of all languages will appear on the same page. "...
I get it. The file I downloaded from this link:
viewtopic.php?p=330#p330

In the source file, the switch.php is not coded in couch code. I get the switch.php file from switch.zip...
2 posts Page 1 of 1