Created
November 2, 2022 03:40
-
-
Save synodriver/be3da44b305fc171d25141808e10a848 to your computer and use it in GitHub Desktop.
让abaqus切换语言。report只有英文版输出的可以给别的软件
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 摸板抄你自己的 | |
template = """ | |
### | |
### This file contains configuration information for Abaqus/CAE | |
### language settings. | |
### | |
#################################################################### | |
# This section describes what language and what encoding Abaqus/CAE | |
# should use for a given system locale name. | |
# Note: Chinese localization is currently supported on the Windows | |
# platforms only. Therefore, all zh_CN* encodings are still | |
# mapped to en_US. | |
[Alias] | |
ja_JP.UTF-8 = ja_JP | |
ja_JP.utf-8 = ja_JP | |
ja_JP.UTF8 = ja_JP | |
ja_JP.utf8 = ja_JP | |
ja_JP.SJIS = ja_JP | |
ja_JP.sjis = ja_JP | |
Japanese_Japan.932 = ja_JP | |
Ja_JP = ja_JP | |
ja_JP.EUC = ja_JP | |
ja_JP.eucJP = ja_JP | |
ja_JP.eucjp = ja_JP | |
ja_JP = ja_JP | |
ja = ja_JP | |
en_US.UTF-8 = en_US | |
en_US.utf-8 = en_US | |
en_US.UTF8 = en_US | |
en_US.utf8 = en_US | |
en_US.iso88591 = en_US | |
English_United States.1252 = en_US | |
en_US.ISO8859-1 = en_US | |
zh_CN.UTF-8 = en_US | |
zh_CN.utf-8 = en_US | |
zh_CN.UTF8 = en_US | |
zh_CN.utf8 = en_US | |
zh_CN = en_US | |
zh_CN.gb18030 = en_US | |
zh_CN.gbk = en_US | |
Chinese_People's Republic of China.936 = zh_CN | |
Chinese (Simplified)_People's Republic of China.936 = zh_CN | |
{} | |
#################################################################### | |
# This section describes whether the local language and encoding | |
# should be used by default (1 = yes; 0 = no). This flag is useful | |
# because for some regions it may still be preferred that Abaqus/CAE | |
# uses English by default and that the local language is used only | |
# upon request. | |
[Default] | |
ja_JP = 1 | |
en_US = 1 | |
{} | |
################################################################### | |
# This section specifies the location of dictionaries with | |
# translations for the given choice of language and encoding. | |
# Dictionaries are searched under the ABAQUS installation | |
# directory and under any directories listed in the HKS_DICT_DIR | |
# environment variable. The dictionary specified for 'C' | |
# will be used by default. | |
[Dictionary] | |
ja_JP = Configuration/Xresources/ja_JP/ja_JP_Dict.py | |
en_US = Configuration/Xresources/en_US/en_US_Dict.py | |
zh_CN = Configuration/Xresources/zh_CN/zh_CN_Dict.py | |
C = Configuration/Xresources/en_US/en_US_Dict.py | |
################################################################### | |
# This section specifies the location of dictionaries used in Python | |
# with translations for the given choice of language and encoding. | |
# Dictionaries are searched under the ABAQUS installation | |
# directory and under any directories listed in the HKS_DICT_DIR | |
# environment variable. The dictionary specified for 'C' | |
# will be used by default. | |
[Python Dictionary] | |
ja_JP = Configuration/Xresources/ja_JP/ja_JP_PyDict.py | |
en_US = Configuration/Xresources/en_US/en_US_PyDict.py | |
zh_CN = Configuration/Xresources/zh_CN/zh_CN_PyDict.py | |
C = Configuration/Xresources/en_US/en_US_PyDict.py | |
################################################################### | |
# This section lists locales that Abaqus/CAE will try before | |
# falling back to the 'C' locale. Locales with specific encoding | |
# are preferable to 'C' because encoding for 'C' varies among | |
# platforms. Locales listed here must be supported, i.e. they | |
# must be listed in the [Alias] section. | |
[Fallback] | |
English_United States.1252 | |
en_US.ISO8859-1 | |
en_US.iso88591 | |
""" | |
config_path = "H:\dssimulia2021\win_b64\SMA\Configuration\locale.txt" | |
chinese_comand = "Chinese (Simplified)_China.936 = zh_CN" | |
chinese_comand2 = "zh_CN = 1" | |
use_chinese = True | |
if __name__ == "__main__": | |
print(template.format("", "")) | |
#with open(path. "w") as f: | |
# if use_chinese: | |
# f.write(template.format(chinese_comand, chinese_comand2 )) | |
#else: | |
# f.write(template.format("", "")) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment