Hello,

I install the Babel, the Trac is setting the language according to my
browser (firefox), if i set english the trac shows english, if i set
portuguese
my trac shows portuguese.

I have only more one question ?

How can i set the portuguese brazilian language independently of the
web browser. I resolve this setting this:

On file: /usr/local/lib/python2.6/dist-packages/Trac-0.12-py2.6.egg/
trac/web/main.py

Editing the line: 313

    def _get_locale(self, req):
        if Locale:
            available = [locale_id.replace('_', '-') for locale_id in
                         translation.get_available_locales()]

            preferred = req.session.get('language', req.languages)
            if not isinstance(preferred, list):
                preferred = [preferred]
            negotiated = Locale.negotiate(preferred, available,
sep='-')
            negotiated = 'pt_BR'
            self.log.debug("Negotiated locale oba: %s ->
%s",preferred, negotiated)
            return negotiated


I force the language pt_BR, inserting this line "  negotiated =
'pt_BR'   "

But, i known that this is not elegant way to solve this issue:

What is the better way to do this ?

I guess that this answer is setting the trac.local environment
variable:

But i tried to set this variable in every place, but the system is not
translated.

Question: Why the configuration in apache doesn't work ?

  <Location /trac/ccee>
    SetEnv trac.locale pt_BR.UTF-8
  </Location>

Thanks.
Victor Jabur

Thanks
Victor Jabur

On Sep 2, 4:36 am, Christian Boos <[email protected]> wrote:
>   On 9/1/2010 7:15 PM, victorjabur wrote:
>
> > Hello,
>
> > I want to install my trac using the language portuguese-brazil (pt-
> > BR).
>
> > I follow this steps, but the trac isn't translated.
>
> > 1) Download ofhttp://ftp.edgewall.com/pub/trac/Trac-0.12.tar.gz
> > 2) I extracted "tar -xzf Trac-0.12.tar.gz"
>
> Ok.
>
> > 3) I follow the "Using python tools" in this 
> > link:http://trac.edgewall.org/wiki/TracL10N
> > 3.1) python setup.py extract_messages
> > 3.2) python setup.py update_catalog -l pt_BR
> > 3.3) python setup.py compile_catalog -f -l pt_BR
>
> This is only needed if you want to contribute to the translations or
> modify the translations.
>
> > 3.4) sudo python setup.py install
>
> This is all what should have been necessary ... provided you installed
> Babel *beforehand*.
> To fix the problem, simply install Babel (e.g. "easy_install Babel")
> then redo the above step 3.4).
>
> -- Christian

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.

Reply via email to