Skip to content

Commit f6b8b99

Browse files
committed
Add data.py.
1 parent 0043c34 commit f6b8b99

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

learnregex/data.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import gettext
2+
import os
3+
4+
domain = 'learnregex'
5+
localedir = os.path.join(os.path.dirname(__file__), 'locale/')
6+
gettext.bindtextdomain(domain, localedir)
7+
translation = gettext.translation(domain, localedir, fallback=True)
8+
9+
10+
def _(msg):
11+
return gettext.dgettext(domain, msg)

0 commit comments

Comments
 (0)