Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to conveniently set other languages? #1215

Closed
CrystalWindSnake opened this issue Jul 21, 2023 · 3 comments
Closed

How to conveniently set other languages? #1215

CrystalWindSnake opened this issue Jul 21, 2023 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@CrystalWindSnake
Copy link
Contributor

Description

ui.add_body_html(
    """
<script>
  Quasar.lang.set(Quasar.lang.zhCN)
</script>
"""
)

@ui.page("/test")
def page_test():
    ui.date("2023-01-01")

ui.date("2023-01-01")
ui.run(language="zh-CN")

This code does not work.

@falkoschindler falkoschindler added the bug Something isn't working label Jul 21, 2023
@falkoschindler falkoschindler self-assigned this Jul 21, 2023
@falkoschindler falkoschindler added this to the 1.3.6 milestone Jul 21, 2023
@falkoschindler
Copy link
Contributor

Oh, thanks for spotting this, @CrystalWindSnake!
It's actually a bug with language codes containing a region ("CN").
I already fixed it in commit 6f81f32. It will be part of the next release.

@falkoschindler
Copy link
Contributor

Oh, to answer the question in the title, this should be enough:

ui.date("2023-01-01")
ui.run(language="zh-CN")

@CrystalWindSnake
Copy link
Contributor Author

@falkoschindler Thank you so much for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants