Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117883723
translate.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
translate.py
View Options
# -*- coding: utf-8 -*-
# Copyright 2010-2012 Kolab Systems AG (http://www.kolabsys.com)
#
# Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 3 or, at your option, any later version
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
try
:
from
pykolab.constants
import
domain
except
ImportError
:
domain
=
'pykolab'
import
gettext
import
os
N_
=
lambda
x
:
x
_
=
lambda
x
:
gettext
.
ldgettext
(
domain
,
x
)
def
getDefaultLangs
():
languages
=
[]
for
envar
in
(
'LANGUAGE'
,
'LC_ALL'
,
'LC_MESSAGES'
,
'LANG'
):
val
=
os
.
environ
.
get
(
envar
)
if
val
:
languages
=
val
.
split
(
':'
)
break
if
'C'
not
in
languages
:
languages
.
append
(
'C'
)
# now normalize and expand the languages
nelangs
=
[]
for
lang
in
languages
:
for
nelang
in
gettext
.
_expand_lang
(
lang
):
if
nelang
not
in
nelangs
:
nelangs
.
append
(
nelang
)
return
nelangs
File Metadata
Details
Attached
Mime Type
text/x-script.python
Expires
Mon, Apr 6, 1:08 AM (3 d, 2 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ae/e9/3d48441d3f60b1eb8f14711bfd1e
Default Alt Text
translate.py (1 KB)
Attached To
Mode
rP pykolab
Attached
Detach File
Event Timeline