2013-11-09 21:04:36 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
2013-11-09 23:42:02 +00:00
|
|
|
# Copyright (C) 2013 Alex Yatskov
|
2013-11-09 21:04:36 +00:00
|
|
|
#
|
|
|
|
# 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, either version 3 of the License, 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 General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
2013-11-09 23:42:02 +00:00
|
|
|
import deinflect
|
|
|
|
import dictionary
|
2013-11-09 21:04:36 +00:00
|
|
|
import os.path
|
2013-11-09 23:42:02 +00:00
|
|
|
import translate
|
2013-11-09 21:04:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
def initLanguage():
|
2013-11-10 16:27:40 +00:00
|
|
|
directory = os.path.split(__file__)[0]
|
2013-11-09 23:42:02 +00:00
|
|
|
return translate.Translator(
|
2013-11-10 16:27:40 +00:00
|
|
|
deinflect.Deinflector(os.path.join(directory, 'deinflect.json')),
|
|
|
|
dictionary.Dictionary(os.path.join(directory, 'dictionary.db'))
|
2013-11-09 23:42:02 +00:00
|
|
|
)
|