Advanced tricks

How can I create a bilingual blog?

Scenario:
"I would like to create a bilingual blog with both and versions of the same item."

Solution:
Use the "Extended Entry" function of Nucleus to achieve this purpose. Use the Body part of the item for your primary language, and the Extended Entry part for your secondary language. You can control the display of these using templates and some php.

Original forum thread (thanks, faceh!):
http://forum.nucleuscms.org/viewtopic.php?t=10332

Method:

  1. Clone your current index and item templates. If your primary and secondary languages are English and Chinese, you should probably rename them something like this:
    skinname_en/index and skinname_en/item
    skinname_ch/index and skinname_ch/item
  2. Edit the primary language templates (in our example, skinname_en/index and skinname_en/item)to have only the templatevar <%body%> inside the "Item Body" section of the templates.
  3. Edit the secondary language templates (in our example, skinname_ch/index and skinname_ch/item) to have only the templatevar <%more%> inside the "Item Body" section of the templates.
  4. Install NP_languageLink and set your plugin options appropriately in the Nucleus CMS admin area.
  5. Edit your primary language template to put in the skinvar <%languageLink(secondarylanguagename)%> where "secondarylanguagename" is the name of your secondary language, e.g. Chinese.
  6. Edit your secondary language template to put in the skinvar <%languageLink(primarylanguagename)%> where "primarylanguagename" is the name of your primary language, e.g. English.
  7. Make sure to write in your primary language in the Body section and your secondary language in the Extended section always.
  8. Done!
  9. section: Advanced tricks | submitted by Leng on 2006.Jan.13 | 4327 views

    item rate
    Total votes: 7 - Rating: 3.57

    Please tell us how useful this answer was to you (0 = useless, 10 = very very helpful):

    10