Replies: 1 comment
-
Thanks for the idea. Can the texts embedded in the code also be translated via these files? What about the performance? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I’ve been experimenting with the assistant.koplugin and wanted a lightweight way to translate its UI without diving into the full PO/MO workflow. Instead of generating .po files and compiling them, I propose adding a simple “language override” mechanism right in
configuration.lua
. This lets anyone drop in alanguage_spanish.lua
,language_turkish.lua
, or similarly named file and have all of the plugin’s buttons, prompts, and messages appear in their language—while still falling back to English when no file is provided.Maybe something like this.
Why this approach?
I’d love to hear your thoughts. Does this fit the plugin’s style guidelines? Are there edge cases I’m missing (e.g., dynamic strings or plurals)? Would you prefer a different loading mechanism? Looking forward to feedback!
Full examples of language files (Chatgpt translated).
Example
language_turkish.lua
Example
language_spanish.lua
Beta Was this translation helpful? Give feedback.
All reactions