Page 1 of 1

"Localization file not found"

Posted: Mon Jan 23, 2012 6:43 am
by jorool
Hello!

At the initialization of my app I add two languages:

Code: Select all

var ptBR:StiLanguage = StiLanguage.fromUrl("localeReport/pt-BR.xml", "",  "Português (Brasil)", "");
var es:StiLanguage = StiLanguage.fromUrl("localeReport/es.xml", "",  "Español", "");
StiLocalization.addLanguage(ptBR);
StiLocalization.addLanguage(es);
StiLocalization.setLanguage(ptBR);
But in the viewer the message "Localization file localeReport/pt-BR.xml not found" is showed.
Can you help me?
What is the problem?

Thanks.

[EDIT]: current version is 2012.1.1207

"Localization file not found"

Posted: Tue Jan 24, 2012 6:24 am
by Vladimir
Hello,

We could not reproduce the error. Please see the attached example.

Thank you.

"Localization file not found"

Posted: Tue Jan 31, 2012 5:21 pm
by jorool
Hello Vladimir,

I could not find diferences between our codes.
Please see the images. I want to show you the folder structure of the project and where the localization files are.
The method registraIdiomasRelatorio() is executed without errors.
Image

"Localization file not found"

Posted: Wed Feb 01, 2012 4:16 am
by Vladimir
Hello,

Please try to specify the following path to the localization files:

"main/flex/localeReport/pt-BR.xml"

Thank you.

"Localization file not found"

Posted: Wed Feb 01, 2012 6:39 am
by jorool
Hello Vladimir!

The same error!

"Localization file not found"

Posted: Wed Feb 01, 2012 7:13 am
by Vladimir
Hello,

Please tell us which folder the compiled application is copied to? In this folder the localization files will automatically be copied, and it is needed to set the path to them relatively to this folder, because the swf file of the application is there.

Thank you.

"Localization file not found"

Posted: Wed Feb 01, 2012 7:29 am
by jorool
Hello,

This path was working fine for months.
Can I use "../" to go back through the folders?

"Localization file not found"

Posted: Wed Feb 01, 2012 8:14 am
by jorool
Hello!

I moved the "localeReport" folder to the folder wich the compiled application is to try to solve the problem.....same error.
So I moved it back......and worked... ._. (poker face) ...mistery of midnight.
Its working now.

Thank you for your attention!

"Localization file not found"

Posted: Wed Feb 01, 2012 8:57 am
by Vladimir
Hello,

Most likely the folder with localizations files for some reason do not automatically copy to the resulting folder. In this case, the files can be copied manually, that you did.

Thank you.