There's no GUI to change the order of entries in the ZMI's portal_language tool (and that is the order that will be used on the page as far as I could find out).
However: in portal_setup
, you can export the language settings, which will give you a file portal_languages.xml
, wrapped inside an archive, with a content similar to the following:
<?xml version="1.0"?>
<object>
<default_language value="en"/>
<use_path_negotiation value="False"/>
<use_cookie_negotiation value="True"/>
<set_cookie_everywhere value="False"/>
<use_request_negotiation value="True"/>
<use_cctld_negotiation value="False"/>
<use_content_negotiation value="True"/>
<use_combined_language_codes value="False"/>
<display_flags value="False"/>
<start_neutral value="False"/>
<use_subdomain_negotiation value="False"/>
<authenticated_users_only value="False"/>
<supported_langs>
<element value="de"/>
<element value="da"/>
<element value="it"/>
<element value="en"/>
<element value="fr"/>
<element value="cs"/>
</supported_langs>
</object>
You can change the order of the lines in <supported_langs>
, put the file back into the archive, and use "import uploaded tarball" in portal_setup
's import function to apply the changed xml file.
Alternatively, you can create (and run via the "test" tab) a Script(Python) like this, which will first remove and then re-add the languages one by one in the desired order. (You might need to run the @@language-setup-folders
step again afterwards if you use different folders and the root language switcher for your languages.)
# Return a string identifying this script.
print "This is the", script.meta_type, '"%s"' % script.getId(),
if script.title:
print "(%s)" % html_quote(script.title),
print "in", container.absolute_url()
pl = context.portal_languages
pl.removeSupportedLanguages(pl.getSupportedLanguages())
print pl.supported_langs
pl.addSupportedLanguage('de')
pl.addSupportedLanguage('fr')
pl.addSupportedLanguage('da')
pl.addSupportedLanguage('en')
print pl.supported_langs
return printed
I tried going though the documented manage_setLanguageSettings
method directly, but, at least in 4.3.2, that requires you to explicitly set all the other parameters (use cookie for language negotation et al.), so I wasn't too impressed.