Currently CHDK compiles the English language file into the code (and CHDK-DE compiles the German language file).
For English and German users there is almost no overhead to having the language available.
For all other languages the code loads the language text file and converts it to the internal CHDK format at run time. The original English/German text is still present so there is a significant memory overhead to using any other language (~13k - 19K).
An idea I had was to convert all of the text language files to a binary format (as part of the build process) and only load the relevant language at startup (or when the user changed languages). This could be done using the module loading system although a simple binary format would probably suffice.
Advantages of this would be:
- no overhead to using other languages
- reduce the core CHDK code size by removing the code that loads & converts the text files
Disadvantages (that I can think of):
- requires a build environment to update & test language file changes
- no language file strings available until after the language file is loaded (so needs to load before the splash screen)
The problem of requiring a build environment to test an updated language file could be alleviated with a module that could convert a language text file to the binary format directly on the camera.
Any thoughts?
Phil.