Carbon Poker offers a 5 card stud game that wasn't listed here. It's not available...
[fpdb-dooglus.git] / pyfpdb / L10n.py
blobf6ed618e99d7606d041edca5e9b16f90ed8fa4a0
1 #!/usr/bin/env python
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.
18 import locale
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
24 else:
25 import gettext
26 try:
27 trans = gettext.translation("fpdb", localedir="locale", languages=[lang])
28 trans.install()
29 translation=_
30 except IOError:
31 translation=pass_through
33 #def translate(to_translate):
34 # return _(to_translate)
36 def get_translation():
37 return translation