larsiusprime / firetongue

A translation/localization framework written in Haxe
MIT License
143 stars 32 forks source link

FireTongue::get() always returns the tag #7

Closed RudolfVonKrugstein closed 10 years ago

RudolfVonKrugstein commented 10 years ago

Hey,

I do not know what is wrong, maybe someone here can spot it. I have:

Asserts/locales/index.xml

<?xml version="1.0" encoding="utf-8" ?>
<data>
    <file id="data" value="data.csv"/>

    <!--American English-->
    <locale id="en-US" is_default="true" sort="0">  
        <contributors value="Nathan Huesken"/>
        <ui language="Language" region="Region" accept="Okay" />
        <label id="en-US,en-GB,en-CA" language="English" region="United States"/>   
    </locale>    

</data>

Asserts/locales/en-US/data.csv:

"flag","content"
"$CONNECTION_PROBLEM","There seems to be connection or server problem. Please connect to the internet or try again later"

And than in the code:

    public function new () {
      tongue = new FireTongue();
      tongue.init("en-US",onLoaded, true);
    }

    static public function onLoaded() {
      trace(tongue.get("$CONNECTION_PROBLEM"));
    }

The output is: $CONNECTION_PROBLEM

What could be wrong?

larsiusprime commented 10 years ago

You keep saying "AsseRts/" (with an R)...

Shouldn't that be "Assets" ? Is that just a typo here, or is the folder also named that?

You also might try adding commas on the end of your lines, like:

"flag","content",
"$CONNECTION_PROBLEM","There seems to be connection or server problem. Please connect to the internet or try again later",
RudolfVonKrugstein commented 10 years ago

AsseRts is a typo! But the missing "," where it! Thanks!