일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- localization
- andrew ng
- 현지화
- internationalization
- gettext
- deeplearning.ai
- AI
- docker
- 국제화
- Python
- coursera
- I18N
- gettext_windows
- Today
- Total
목록Python3/국제화ᆞ현지화 (2)
JMANI
gettext docs: https://docs.python.org/ko/3.8/library/gettext.html gettext — 다국어 국제화 서비스 — Python 3.8.13 문서 gettext 모듈은 파이썬 모듈과 응용 프로그램을 위한 국제화(I18N)와 현지화(L10N) 서비스를 제공합니다. GNU gettext 메시지 카탈로그 API와 파이썬 파일에 더 적합한 고수준 클래스 기반 API를 모두 지원 docs.python.org 1. create test.py # test.py ''' # File Structure ---test.py ---locale |---ko_KR |---LC_MESSAGES |---messages.mo |---messages.po |---messages.pot '''..

python 3.7.0 Windows 1. 국제화 대상 파일 # test.py import gettext, gettext_windows gettext_windows.setup_env() # window t = gettext.translation('messages', 'locale') _ = t.gettext trans = _('translatable') apple = _('apple') 2. *.pot file 생성 pybabel extract -o : output file name > mkdir locale > pybabel extract -o # create *.pot > pybabel extract . -o # 현재 경로의 모든 파일 extracting messages from \test.py wr..