2 # -*- coding: utf-8 -*-
4 #Copyright 2010-2011 Steffen Schaumburg
5 #This program is free software: you can redistribute it and/or modify
6 #it under the terms of the GNU Affero General Public License as published by
7 #the Free Software Foundation, version 3 of the License.
9 #This program is distributed in the hope that it will be useful,
10 #but WITHOUT ANY WARRANTY; without even the implied warranty of
11 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 #GNU General Public License for more details.
14 #You should have received a copy of the GNU Affero General Public License
15 #along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #In the "official" distribution you can find the license in agpl-3.0.txt.
19 def pass_through(to_translate
): return to_translate
21 (lang
, charset
) = locale
.getdefaultlocale()
22 if lang
==None or lang
[:2]=="en":
23 translation
=pass_through
27 trans
= gettext
.translation("fpdb", localedir
="locale", languages
=[lang
])
31 translation
=pass_through
33 #def translate(to_translate):
34 # return _(to_translate)
36 def get_translation():