How can I add translations to a Plone site front-page

狂风中的少年 提交于 2020-01-06 20:12:36

问题


I'm using LinguaPlone in a site thas is written in English and Spanish. All site pages and folders can be translated, except the front page folder. I think that I can translate the page that the front page folder uses as view, but in that case when a user goes to front page, only the folder view is showed (not its translation).

I'm using Plone 4.1.4 and LinguaPlone 4.1.2. Maybe I need to try with other tool, as raptus.multilingualplone.


回答1:


Normally, when setting up a LinguaPlone site you let LinguaPlone create top-level per-language folders that act as navigation roots. The root of the site itself is set up to redirect visitors to one of these roots depending on their language preferences and other factors, using a language selector.

Take a look at http://www.norden.org/ for an example of such a site. Notice that when you visit that URL you are automatically redirected to one of the supported languages, usually to http://www.norden.org/en/ for english. You can switch between the available languages on the top left, and you'll see that the first element of the URL changes between the language codes. Those are the top-level folders.

The advantage here is that each of these folders can have it's own default view. Another is that URLs are always crystal clear for visitors; switch from "About this website" (http://www.norden.org/en/about-this-website) to the Norwegian translation and you end up on on http://www.norden.org/no/om-nettstedet; anyone can see that the new URL is in the Norwegian language even if they do not understand that language.

You can set up these language folders after the fact, as documented in the LinguaPlone installation instructions; simply visit the URL:

http://localhost:8080/Plone/@@language-setup-folders

but be sure to backup your site first and to adjust the address for your local situation.



来源:https://stackoverflow.com/questions/10905349/how-can-i-add-translations-to-a-plone-site-front-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!