Skip to content

Commit

Permalink
FEATURE: Add chinese translation
Browse files Browse the repository at this point in the history
Add scripts to create and update translations
  • Loading branch information
amilcarlucas committed Oct 28, 2024
1 parent 2e58281 commit 3152c1b
Show file tree
Hide file tree
Showing 7 changed files with 2,881 additions and 5 deletions.
6 changes: 1 addition & 5 deletions MethodicConfigurator/internationalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@
import gettext


# Setup language
locale_path = 'locale' # directory of locale file
language = 'zh_CN' # select language

# create translation
translation = gettext.translation('messages', localedir=locale_path, languages=[language], fallback=True)
translation = gettext.translation('MethodicConfigurator', localedir='locale', languages=['zh_CN'], fallback=True)

# set translation object as _()
_ = translation.gettext
Loading

0 comments on commit 3152c1b

Please sign in to comment.