2016-03-07 11:57 PM
Hello everyone,
I am looking for any information about design multilanguage pages on embedded systems. I mean how to resolve problems with memory (flash, external memory for web files, RAM, etc.), any design solutions. In my project I made multilang page in JavaScript function which called every onLoad event. It works but is it good practice for more languages on the page ? It is possible but we create enormous function in JS which translate languages on every html controls (innerHtml, value, etc). How about a lot of html files encoding in flash memory/external memory (sd card) with other languages ? What is better - enormous JavaScript function to translate text in html pages or a lot of prepared multilang html files. When user choose for example spain language - microcontroller load spain language html file. I hope that I'm not the only one who struggles with this problem. Do you any ideas for resolve this problem? Good practice, solution... #stm32-multilang-www2016-03-08 04:58 AM
Multilingual support can be a complex topic. At a minimum you can load your text into message catalogs so that when you display text you specify a number and the catalog converts it into the right string and font. You also have to allow for left or right start, and vertical or horizontal. Plus you need the fonts to render different text or ideograms.
Remember the size of text strings can vary considerably when converting between languages. You can't rely on hard-coded placement. Microsoft has extensive documentation on how to do this in Windows. Take a look at how resource files are used by culture. It's worth starting there for the research value, to get an idea of all the different problems you'll encounter. Even displaying numbers, currency or date/time can be difficult. Jack Peacock2016-03-08 05:46 AM
+1 Resource, both Apple and Microsoft have handled this, review.
Use a resource structure, accessed as a file system or by index, and have an instance for each language/locale you can select. This will however force you to separate the changeable texts from in-line statics within the code.