Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Resourestrings in flash CS6 AS3

New Here ,
Aug 29, 2016 Aug 29, 2016

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?

TOPICS
ActionScript
212
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 29, 2016 Aug 29, 2016

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>

.

...
Translate
Community Expert ,
Aug 29, 2016 Aug 29, 2016

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>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 30, 2016 Aug 30, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 30, 2016 Aug 30, 2016
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines