Language Selector

Provides a drop down list to select a different language.

<ul id="portal-languageselector"> </ul>
Site Setup > Zope Management Interface > portal_view_customizations
Go to:

Customizing in your own product

The following details will help you locate the files that you will need to copy into your own product. They will also help you to provide the correct information to create your own zcml directives, Python classes, and interfaces.See viewlet for more information.

Located in:

  • [your egg location]/plone/app/i18n/locales/browser/
  • [your egg location]/[version].egg/plone/app/i18n/locales/browser/
Template Name:
Class Name:
plone.portalheader (name) (interface)

Sample files & directives

Put a version of in [your theme package]/browser/templates)

Create your own version of the class in [your theme package]/browser/[your module].py

from import LanguageSelector
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
class [your class name](LanguageSelector):
    render = ViewPageTemplateFile("[your template name]")

Wire up your viewlet in [your theme package]/browser/configure.zcml

    name="[your namespace].[your viewlet name]"
    class=".[your module].[your class name]"
    layer=".interfaces.[your theme specific interface]"

In [your theme package]/profiles/default/viewlets.xml

Hide the original viewlet (if you wish)

    <hidden manager="plone.portalheader" skinname="[your skin name]">
        <viewlet name="" />

Insert your new viewlet in a viewlet manager

    <order manager="plone.portalheader" skinname="[your skin name]"
           based-on="Plone Default">
        <viewlet name="[your namespace].[your viewlet name]"
                 insert-before="*" />