Skip to content

Conversation

evnchn
Copy link
Collaborator

@evnchn evnchn commented May 15, 2025

This PR adds internalization support to the NiceGUI documentation, fix #4025 and generally enables multilingual display, despite our documentation created and defined using Python only.

Compared to others libraries which use Markdown, architecturally it is more of a challenge, but we also have a bit more ease just because we are maining one codebase.

Open questions:

  • Is this necessary in the age of AI, where people can have AI translation tools?
    • Particularly, can a well-tuned but cheaper LLM (for the batch translation) outperform a non-tuned but more high-quality LLM (used in translation engines, possibly paid)?
  • How to break up the file so that we are reading several small files, not one big Python dictionary, so that maintenence is a bit easier and we don't have Merge Conflict Hell in GitHub?
  • Tooling such as automatically adding the TRANSLATEID tags, automatically calling LLM for the translation
  • Prompt adjustment for the LLM
  • Ensure decent enough coverage of the documentation website

Results:

http://127.0.0.1:8080/set_language set the language between:

  • en: What we have now
  • cn: What was requested in Add Simplified Chinese Documentation #4025
  • jp: Generally takes more space because spelling terms in Katakana is less space-efficient than English characters
  • de: Concerned over extremely long words messing up the line breaking. Also Zauberzeug is a German company. As a reminder "Kraftfahrzeug-Haftpflichtversicherung" stands for "motor vehicle liability insurance"
{3970EE26-CADB-434C-9486-A55D260DC69B} {A0974519-2708-4359-B12A-4BBDEDB9A82E} {2CEDD643-4485-427B-A1D8-566492D7E16F} {8B2571A5-3F5B-4168-84ED-F6BE28291EC4}

@evnchn evnchn marked this pull request as draft May 15, 2025 20:52
@evnchn evnchn added documentation Type/scope: Documentation, examples and website feature Type/scope: New feature or enhancement ⚪️ minor Priority: Low impact, nice-to-have labels May 16, 2025
@evnchn evnchn self-assigned this May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Type/scope: Documentation, examples and website feature Type/scope: New feature or enhancement ⚪️ minor Priority: Low impact, nice-to-have
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant