New functionality in my Flash app: Change language upon starting, based on userlanguage. I want textfields, buttons and other to change their language and embed font.
My idea, summary:
1. Flash starts
2. Preloader runs. Preloader done.
3. Flash detects user language = e.g. russian
(should also be possible to choose via flashvars)
3. Loads [login to view URL]
4. Loads ru_arial (loading already implemented)
5. Changes labels on all TextFields and other objects storing text-data. Changes labels' embed-fonts also (new font = e.g, ru_arial.)
## Deliverables
New functionality in my Flash app: Change language upon starting, based on userlanguage. I want textfields, buttons and other to change their language and embed font.
My idea, summary:
1. Flash starts
2. Preloader runs. Preloader done.
3. Flash detects user language = e.g. russian
(should also be possible to choose via flashvars)
3. Loads [login to view URL]
4. Loads ru_arial (already implemented)
5. Changes labels on all TextFields and other objects storing text-data. Changes labels' embed-fonts also (new font = e.g, ru_arial.)
-----
I have the design of the project in CS3 Flash Authoring tool. I want to have all the text (some interactive, some not) translated automatically when the flash loads.
I believe the best way is to have all Textfields dynamic and some interface to find them and change their language and embed font. Maybe all textfields should be objects extending a LocalizableTextField class? Or would this become to bloated? I don't know. Some of my other classes also needs to implement some interface for localization.
Exact needs:
5.1 Register all Buttons and Textfields in flash. As well as other classes containing text. I think I need an Interface here?
5.2 On init, read their current "label"
5.3 Load needed XML and find translation according to XML. (by finding their current text and replacing it)
5.4 Change value of their label. Change their font to correct embedfont.
5.5 Some access function allow mapping of other text (error messges etc, to the right language)
I have a routine for loading embedfonts already. I need 2,3 and 5.