rojects/workspace/history/2026/07-July/06-Monday/Locales Update.txt

18 lines
980 B
Plaintext

[ Locales ]
All strings in the application need to be replaced by localized strings (not now, but on the long run).
We already started to implement it, but we're still not using it.
The idea is the following: The locales are stored in "locales" with "locales/en" being the English source
of the application and are then generated. Each directory will be also a directory and has its own class that will be put into
"src/locales/generated". So a "locales/en/commands" will be created as "src/locales/generated/commands/Commands.ts" and will
contain all files of the source directory "locales/en/commands" as members.
The locales can have multiple formats:
- .txt: Raw utf8 text
- .html: Html text
- .json: A flexible json format that has at least { value:string }
Also any of these locales can have a companion starting with the same name but ending with an .md
- greetings.txt
- greetings.text.md
This files are context files. They give some context for the localization.