mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 11:42:45 +00:00
BIMTester now operates on single feature files, which heavily improves usability
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import gettext
|
||||
|
||||
translation = None
|
||||
|
||||
def _(message):
|
||||
if translation:
|
||||
return translation(message)
|
||||
return message
|
||||
|
||||
|
||||
def switch_locale(locale_dir, locale_id="en"):
|
||||
global translation
|
||||
newlang = gettext.translation("messages", localedir=locale_dir, languages=[locale_id])
|
||||
newlang.install()
|
||||
translation = newlang.gettext
|
||||
Reference in New Issue
Block a user