cancel
Showing results for 
Search instead for 
Did you mean: 

Internationalization

marccollin7379
Associate II
Posted on April 10, 2015 at 14:24

hi

what is the approach to do  

http://askubuntu.com/questions/502987/what-to-do-so-that-issue-net-shows-readable-banner-characters-to-chinese-russian

 with stm32f4 board?

thank

#software-design
6 REPLIES 6
jpeacock
Associate II
Posted on April 10, 2015 at 17:01

If by ''internationalization'' you mean localizing an application to a particular language/culture that's entirely up to how the application software is designed.  Whether it's an 'F4 controller or an IBM Z series mainframe the hardware makes no difference.

If there's a user interface (and remember in the embedded world many controllers never interact with humans) then you have to design some type of message catalog for all text displays, where the catalog is selected by a localization code.  In the application all text is referenced by an identifier, the key in the message catalog.  Your display routines also have to manage fonts for languages and text direction (both left-right-alternating, vertical-horizontal and front-back).  For example, European languages text is front to back paging, horizontal character spacing, left to right sequence, where Chinese text is back to front, vertical, right to left. 

Anything color coded will also have to be tied to a selected culture.  Red doesn't mean emergency or stop in every part of the world.  Same for units of measure, time and currency displays, etc.

Microsoft has quite a bit of online information on how to design applications for multiple languages and cultures.  The mechanics aren't the same but the concepts and design patterns work just as well in an embedded environment.

Even if you only communicate with some type of control system there are local considerations.  For example, using CAN networking to a SCADA system with a CANopen protocol there are defined units of measure and scaling for the protocol that must be included in device profiles.  It's not enough to report the car speed is 65, is it kilometres/hours, meters/second, miles/hour, or even furlongs/fortnight (a popular unit of measure for those who routinely travel on backs of tortoises)?

  Jack Peacock
marccollin7379
Associate II
Posted on April 10, 2015 at 17:43

i will surely not use the same way when i use a 3Ghz and  8gig of ram then an 200mhz and 128k of ram...

jpeacock
Associate II
Posted on April 10, 2015 at 19:36

How high is up?  Ask a question about program design concepts, you get an answer in general concepts.  The design patterns are the same regardless of resources, only the implementation changes.

A small memory on an F4 means you have to include enough external storage for message catalogs for every locale you want to support.  And you have to structure text as an abstract object that is translated through a catalog before being displayed.  The principle is the same, be it for a PC or a controller.  Same for text attributes, displaying French backwards because you only support right to left data entry turns your controller application into the internet joke of the day. 

Not enough resources to do that?  Then you have to reduce your design goals to only support a small number of options.  Or front end your controller app with a PC app that converts language independent data transfers from the controller into localized display.  But whatever approach, the general principles have been around for a while now.  Ignoring them just because Microsoft publishes the design patterns is like refusing to use disk drives because they were invented by IBM.

  Jack Peacock

As an obscure philosopher once said, ''Those who ignore history are doomed to repeat everything IBM developed on the 360/67.''
marccollin7379
Associate II
Posted on April 10, 2015 at 19:43

you answer is completly useless

if i have 200k of string to load, maybe it's better to use

static const char *

and the string will be in flash instead of ram...

so there are some way who are better in embedded system ...

...

Posted on April 10, 2015 at 22:37

if i have 200k of string to load, maybe it's better to use..

Or not load them all into memory at once at all. Put them in some secondary storage. Create a resource/localization file system.

ST has F4 parts with 2MB of FLASH, strings are pretty compressible.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
jpeacock
Associate II
Posted on April 11, 2015 at 01:09

Okay, so you know the size of your message catalog will be at least 200KB.  Does the part have enough internal flash to support that plus code, and will the catalog be updated separately from the code, in which case you have to align the catalog to a multiple of the 128KB F4 internal flash sector size?  Some language text strings are much larger than others (compare using wide 16-bit characters the size of a very succinct Japanese text to a relatively verbose French), can you reliably set an upper size for a message catalog in advance ,or do you build an open-ended design that supports any length string?

Or (to borrow a concept IBM developed on the 360/67, known as a DAT box) you can move the catalog to pages on an external serial NOR flash, with a smaller 4KB page size.  The text key dynamically translates (i.e. a software DAT box) from a logical internal memory address to a physical external flash page, locating your actual text at a base page plus sector or object offset.  That way every string can be updated individually by writing to the external flash, allowing you to customize the controller to a specific language or customer request without modifying instruction flash.

The new F7 parts have hardware support for this (again, the direct descendant of the 360/67 Dynamic Address Translation design) .  A quad SPI serial NOR physical address space maps into the M7 logical address space.  It's like an extra 8MB of flash for data storage was added to the controller, exposed as virtual memory.

  Jack Peacock

''It's deja vu all over again,'' Yogi Berra