Fork me on GitHub

How to static contents and languages?  Bottom

  • I'm building a new site using PN .8 and I have to install at least 2 languages... but how can I create a "static" page and define different contents for every languages?
    Pages and htmlpages don't seem to allow it (you can make a page for every languages, but when the user switch from english to italian the page will remains in english until the user don't click on the new language specific menu)

    Is there any module or workaround for what I'm trying to do? Thanks

    --
    Zikula Italia
    SimpleGallery
  • There's nothing I know that will do this now (maybe Pagesetter).

    What i'm looking to for a future release is to handle ML content differently. The problem with simply defining any content item in multiple languages by simply creating two copies in different languages is that associated services (e.g. hooks - comments, ratings etc.) don't tie up.

    What i'd like to do is have a system where by you create a content item and then translate it. The core will then provide the user back the relevant item depending on the requested language. This should be seamless and, if possible, integrate auto-magically with existing modules.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Thanks for the information Mark icon_smile

    --
    Zikula Italia
    SimpleGallery
  • Perhaps this is something you could use in your static page

    Code

    <!--[pnusergetlang assign=currentlang]-->

    <!--[if $currentlang == "eng"]-->

     English Text

    <!--[elseif $currentlang == "spa"]-->

     Habla Espagnol?

    <!--[else]-->
     Italiano...  <img src="http://community.zikula.org/images/smilies/icon_smile.gif" alt="icon_smile" />
    <!--[/if]-->


    - Igor
  • Code

    <!--[pnusergetlang assign='lan']-->
        // check against the first language
    <!--[if $lan eq "due"]-->
        // assign the template for this language
    <!--[include file='due.htm']-->
        // add if statements for each language
    <!--[else]-->
        // assume the default language is English
    <!--[include file='default_lang.htm']-->
    <!--[/if]-->


    Or you could break up the HTML files by language, and pull them in as needed...

    --
    David Pahl
    Zikula Support Team
  • Igor,

    Now there's smart(y) idea. Sorry about the pun - I couldn't resist.

    Note: by default the pages module doesn't allow Smarty tags but using the pnrender_hook module you can enable this functionality.

    htmlpages does allow Smarty tags by default.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • 0 users

This list is based on users active over the last 60 minutes.