Hi, With this ticket: http://trac.edgewall.org/ticket/8117
Will be possible to force language in trac.ini file. But, i implant this fix that i told you and my trac is running normally on pt_BR forced. Bye On 5 set, 15:00, Itamar O <[email protected]> wrote: > On Sun, Sep 5, 2010 at 8:48 PM, victorjabur <[email protected]> wrote: > > Yes, I force the language pt_BR for example with this code: > > > Just set to en_US or en for example > > > 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' " > > Wow, thanks for the quick reply! > This seems extremely hacky... > Doesn't it affect everything related to locale-negotiation? (as opposed to > just the console applications) > I was hoping for some command line switch, or environment variable. -- 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.
