Spaces:
Sleeping
Sleeping
fix choices not get translated
Browse files- app.py +1 -1
- requirements.txt +1 -1
app.py
CHANGED
@@ -11,7 +11,7 @@ def greet(name, gender, lang):
|
|
11 |
with gr.Blocks() as demo:
|
12 |
gr.Markdown(value="> Check out [Repository](https://github.com/hoveychen/gradio-i18n) for more examples")
|
13 |
lang = gr.Radio(choices=[("English", "en"), ("中文", "zh"), ("日本語", "ja"), ("한국인", "ko"), ("español", "es"), ("française", "fr"), ("Deutsch", "de")], label=_("Language"))
|
14 |
-
with Translate("
|
15 |
name = gr.Textbox(label=_("Name"), placeholder=_("Input your name here."))
|
16 |
gender = gr.Radio(choices=[_("Male"), _("Female"), _("Unknown")])
|
17 |
output = gr.Textbox(label=_("Greeting"))
|
|
|
11 |
with gr.Blocks() as demo:
|
12 |
gr.Markdown(value="> Check out [Repository](https://github.com/hoveychen/gradio-i18n) for more examples")
|
13 |
lang = gr.Radio(choices=[("English", "en"), ("中文", "zh"), ("日本語", "ja"), ("한국인", "ko"), ("español", "es"), ("française", "fr"), ("Deutsch", "de")], label=_("Language"))
|
14 |
+
with Translate("translations.yaml", lang, placeholder_langs=["en", "zh", "ja", "ko", "es", "fr", "de"]):
|
15 |
name = gr.Textbox(label=_("Name"), placeholder=_("Input your name here."))
|
16 |
gender = gr.Radio(choices=[_("Male"), _("Female"), _("Unknown")])
|
17 |
output = gr.Textbox(label=_("Greeting"))
|
requirements.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
pyyaml
|
2 |
gradio
|
3 |
-
gradio-i18n
|
|
|
1 |
pyyaml
|
2 |
gradio
|
3 |
+
gradio-i18n>=0.0.8
|