FAQ
I want to remove the list of languages when administrator is making a new
list. I want to use the default language, and nothing else. How can I
remove every language in the list, except the default one?

Mailman 2.1.5 on FC3.
--
P?l Monstad

Search Discussions

  • Mark Sapiro at Mar 19, 2006 at 6:24 pm

    pal at hkskole.no wrote:
    I want to remove the list of languages when administrator is making a new
    list. I want to use the default language, and nothing else. How can I
    remove every language in the list, except the default one?
    At the end of Defaults.py you will see the definition of the
    LC_DESCRIPTIONS dictionary. Basically, you want to remove the
    languages you don't want to support, but you don't do this in
    Defaults.py. You do it in mm_cfg.py by copying everything beginning
    with

    def _(s):
    return s

    LC_DESCRIPTIONS = {}

    def add_language(code, description, charset):
    LC_DESCRIPTIONS[code] = (description, charset)

    and ending with

    del _

    Except for the languages you don't want to support. Assuming for
    example that you already have

    DEFAULT_SERVER_LANGUAGE = 'no'

    in mm_cfg.py, you could add


    def _(s):
    return s

    LC_DESCRIPTIONS = {}

    def add_language(code, description, charset):
    LC_DESCRIPTIONS[code] = (description, charset)

    add_language('no', _('Norwegian'), 'iso-8859-1')

    del _

    to mm_cfg.py to make Norwegian the only supported language. If you know
    Python, you could come up with lots of ways to do this in mm_cfg.py,
    byt the above is the most straightforward. Note that you must have an
    LC_DESCRIPTIONS entry for the DEFAULT_SERVER_LANGUAGE. As long as you
    have that, you can have as many or as few of the other languages as
    you want.

    NOTE! Before you do this, you need to be sure the preferred language of
    each existing list is set to (one of) the language(s) you support.
    Otherwise you'll encounter exceptions when accessing the list.

    --
    Mark Sapiro <msapiro at value.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-users @
categoriespython
postedMar 19, '06 at 5:37p
activeMar 19, '06 at 6:24p
posts2
users2
websitelist.org

2 users in discussion

Pal: 1 post Mark Sapiro: 1 post

People

Translate

site design / logo © 2022 Grokbase