16 lines
499 B
Python
16 lines
499 B
Python
# Copyright (C) 2020 by ÿnérant, eichhornchen, nicomarg, charlse
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
import gettext
|
|
|
|
|
|
_TRANSLATORS = dict()
|
|
for language in ["en", "fr"]:
|
|
_TRANSLATORS[language] = gettext.translation("squirrelbattle",
|
|
localedir="locale",
|
|
languages=[language])
|
|
|
|
|
|
def gettext(message: str) -> str:
|
|
return _TRANSLATORS.get("en", _TRANSLATORS.get("en")).gettext(message)
|