stable-diffusion-webui
stable-diffusion-webui copied to clipboard
Translation
Implement my issue #2461
Does gradio not supply any support for localization?
If we ever add this, it will have to be in a form that leaves original code with English untouched.
I checked their documentation and it seems that there is no localization support
about original code, use tr(original)
is ok
ex.
from modules.translate_manage import translate as tr
gr.Button(tr('Save'))
the translate key will be Save
in other lanuage can use Save
as key
ex. zh_cn.json
{
"Save": "保存"
}
感谢您的贡献。请注意,此存储库中的资源不是在开源许可证下提供的。此存储库中的代码资源不保证包含其各自的原始作者许可条款。#2059 https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/master/CODEOWNERS
got it
I have a new idea, use the original English language in the code, just add the tr function? in other languages use original as key, it can achieve the same effect