Python 國際化(i18n) 支持

python使用gettext來實現i18n支持。具體參數信息請看gettext module幫助。 python中對於國際化的字符串,只須要外加_()便可。 如: print(_('hello world')) 而後根據user選擇的語言,建立translation對象,而後調用install方法install_()函數 到Python’s builtins namespace。如: impor
相關文章
相關標籤/搜索