Unable to Resolve Resource Bundle
I presently tried out a number of the innovative localization characteristics of Flex 3 I learned at Adobe Max Europe (Barcelona was enormous btw) additional than I had a number of tribulations to get it running in Flex 3 Beta 2. A significant I had made a note of: if you are planning to utilize this information in sequence for Flex 3 development, please observe the documentation as an alternative. There is a numeral of significant differences in using resource bundles in Flex 3. This information in sequence is merely appropriate to Flex 2.
Re: Unable to Resolve Resource Bundle
A resource bundle is an uncomplicated file, frequently called a properties file, where keys and values are stored. The file format for resource bundles is comparable to Java properties files, by means of a "key=value" on every line. The most important dissimilarity from the Java properties format is that files with non-ASCII characters in them be supposed to be stored as UTF-8.
Re: Unable to Resolve Resource Bundle
The properties files are position in directories where they are able to be searched for by the compiler in the similar method that additional source files are found. The properties files are supposed to be arranged in directories in a specific method. Previous to entering anything else in Flex Builder, we necessitate to generate directories for the properties files. The files are supposed to go in their own directories that are outside of several current source paths. I have encompassed and created the most important directory for the properties file in the defaulting directory for projects.
Re: Unable to Resolve Resource Bundle
The standards in the resource bundles are capable to be accessed in Flex from side to side @Resource in MXML or from end to end ResourceBundle metadata and the ResourceBundle category in ActionScript. There's two pieces of information in sequence that are attractive to have right of entry resource bundles in MXML or ActionScript- a bundle name and a key. The bundle name is the comparable name as the properties file. So if you engender HelloWorldBundle. Properties, the bundle name are HelloWorldBundle. The keys are originate in the properties file, to the left of the values.
Re: Unable to Resolve Resource Bundle
We in addition necessitate adding subdirectories for every language we plan to have resource bundles in. The subdirectory names be supposed to match the locale names we plan to utilize We determine to be using en_US for our English strings and sp for Spanish strings. So at present I encompass: We determine to get back to putting files in these directories afterward. At present we desire to finish setting up our Flex Builder project. To have comprised the project locate the resource bundles, we necessitate adding the directories we have presently created to the source path. We do not add a source path for together en_US and sp, additional than rather we utilize the special "{locale}" signifier. So I add this folder as a source path in Flex Builder.
Re: Unable to Resolve Resource Bundle
To work with the project in Spanish, rights hit it off on the project name and bring up the properties for the project. In the supplementary compiler arguments, modify the locale from "en_US" to "sp". The "sp" matches the folder name where we position the second HelloWorldBundle. Properties when you work with the project subsequent to this, you determine to observe "Hola Mundo".
Re: Unable to Resolve Resource Bundle
If you were building these Flex submissions for presently utilize, you would encompass to copy the directory of output files from the English version or description previous to building the Spanish version or description. On the other hand, you might build these files by means of the command-line compiler when creating the final SWFs. You would in addition necessitate building a page in HTML or Flash for choosing connecting the dissimilar languages.