Copy link to clipboard
Copied
I'm using flash professional and trying to learn to make games.
Wat I want is a multi-language game and therefore using resource strings.
After searching a long time I only find ResourceBundle for FLEX but I have flash cs6.
What I also find is that you can make subdirectories of the language such as "en_US" and in this direcortoy a file "resource.properties" as the placeholder for my strings (textfile).
What I thought to do is something like "var rb:ResourceBundle = new ResourceBundle("en_US", "resource.properties")"
and than with "rb.getString("resource.properties", "stringname of the key in de file", null, "en_US")
" find the translation I want.
So far I can't find anything thats helps me out or get me in the right direction.
Is there somebody who can explain how to use the resource string file in flash professional cs6 in as3?
Or a link to something that explains how I must use it?
don't use that.
it won't work in any new versions of flash/animate and it never was that helpful in cs6.
just create an xml file containing your language strings and load that file at the start of your app. when a language is selected by the user, populate a language object with the appropriate part of your xml file.
assign text using your language object. eg,
xml:
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<languages>
<english>
<text1>hello</text1>
.
.
.
</english>
<danish>
<text1>hej</text1>
.
...Copy link to clipboard
Copied
don't use that.
it won't work in any new versions of flash/animate and it never was that helpful in cs6.
just create an xml file containing your language strings and load that file at the start of your app. when a language is selected by the user, populate a language object with the appropriate part of your xml file.
assign text using your language object. eg,
xml:
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<languages>
<english>
<text1>hello</text1>
.
.
.
</english>
<danish>
<text1>hej</text1>
.
.
.
</danish>
.
.
.
</languages>
Copy link to clipboard
Copied
thanx kglad for your answer.
Your suggestion sounds great and I will look deeper into that.
Perhaps the reason you mention is the cause of the little info there is about using resource string files.
Copy link to clipboard
Copied
you're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now