We have Flash embedded as an ActiveX control in a Delphi application. We want to translate fields in the flash layer from the Delphi layer. We don't want to use XML files or the like.
To do this we call the Flash COM method "SetVariable()" which takes Delphi WideStrings as params.
OK this time I was more methodical with testing SetVariable() with Japanese text. All worked OK.
Comment: Not surprising. Japanese PC should show Japanese ANSI DB strings OK as well as Unicode. To enable English PC to display Japanese Ansi chars you need to enable #2 and #3 Control Panel item (see below). Eng PC had not problems with Japanese Unicode — I disabled Japanese support (see #3 below) and it still displayed ok.
Note: English XP with Japanese Enabled means:
Embedding all fonts sounds like the answer — however a 40K file quickly becomes 2MB with all Japanese fonts embedded. We don't want the software to be wearing that cost.
Solution #1: Have one swf which has most languages. filename.swf (Eng + Latin — filename.swf). And have some special cases where we don't even try to translate. ie. filename_jap.swf, filename_chi.swf. We can just past in the few strings from a Unicode text file sent from the translator and then convert text to BMP (ie, Break apart the font). Either that or have a separate Chinese and Japanese file and they can be big (embed fonts).
With Flash MX 2004 we embed
If you look at the character properties of the 2nd field (between the heading and version fields) you will see all these fonts selected. This brings the file up from 25K to around 50K. No problem.
Note: All fields are Tohama Font and will receive the benifit of embedded in this field. We don't need to embed in all fields. To display Japanese chars we would need to embed the Japanese fonts (Kanji & Kana). However this would see the filesize swell from 25K to 650K.
Because our Japanese strings are fixed we can embed each Japanese word into each associated field. This saves us around 600KB and must be done on a Japanese PC OR an English PC with...
The above settings are required to safely paste the Japanese text into the Unicode entry field "Include these Characters" of the "Character Options" dialog of Flash MX 2004.
This works for us since our Japanese strings are static (we know the runtime strings and users do not enter other characters).