2021-09-08 23:38:34 +08:00
|
|
|
# -------------------------------
|
|
|
|
# Difficult Rocket
|
|
|
|
# Copyright © 2021 by shenjackyuanjie
|
|
|
|
# All rights reserved
|
|
|
|
# -------------------------------
|
|
|
|
|
2021-09-02 22:47:10 +08:00
|
|
|
"""
|
|
|
|
writen by shenjackyuanjie
|
|
|
|
mail: 3695888@qq.com
|
|
|
|
github: @shenjackyuanjie
|
|
|
|
gitee: @shenjackyuanjie
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
class Lang:
|
|
|
|
"""
|
|
|
|
用于创建一个对应语言的翻译类
|
|
|
|
感谢Fallen的MCDR提供idea
|
|
|
|
https://github.com/Fallen-Breath/MCDReforged
|
|
|
|
"""
|
2021-09-05 00:50:05 +08:00
|
|
|
|
2021-09-02 22:47:10 +08:00
|
|
|
def __init__(self, language: str):
|
|
|
|
self.语言 = language
|
|
|
|
self.翻译结果 = {}
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return self.语言
|
|
|
|
|
|
|
|
def __getitem__(self, item):
|
|
|
|
return self.翻译结果[item]
|
|
|
|
|
|
|
|
def __setitem__(self, key, value):
|
|
|
|
pass
|