|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
HowTo Load ResourceBundlesHello everybody,
I integrated the ICU framework into my app to be unicode aware and to externalize strings. I have a to locale files root.txt and de.txt with nor further bundle structure. I compile the txt files with genrb and package them together with pkgdata. The result is a myfile.dat. What do I have to do to get the data in the generated file loaded with "new ResourceBundle(...)"? Im using VC7.1 as IDE and the ICU C++ API. Regards -- kai klesatschke aka yavin http://www.ogre4j.org http://www.ogre3d.org ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ icu-support mailing list - icu-support@... To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-support |
|
|
Re: HowTo Load ResourceBundlesNobody out there who can help a ICU newbie to get it integrated? I read
the user guide but I didn't find a description how to get the thing working at runtime. UErrorCode error = U_ZERO_ERROR; mpResourceBundle = new ResourceBundle( "root", error ); I always get the error that the resource bundle is missing. I have to simple txt files compiled with genrb and packed with pakgdata: root.txt root { msg1 {"first msg"} msg2 {"second msg"} } de.txt de { msg1 {"erste msg"} msg2 {"zweite msg"} } I get root.res and de.res from genrb and mymsgs.dat,.dll from pkgdata. But I have no clue what I must do to get the resources in the generated files loaded with the ResourceBundle ctor. Kai Klesatschke schrieb: > Hello everybody, > > I integrated the ICU framework into my app to be unicode aware and to > externalize strings. I have a to locale files root.txt and de.txt with > nor further bundle structure. I compile the txt files with genrb and > package them together with pkgdata. The result is a myfile.dat. What do > I have to do to get the data in the generated file loaded with "new > ResourceBundle(...)"? > > Im using VC7.1 as IDE and the ICU C++ API. > > Regards -- kai klesatschke aka yavin http://www.ogre4j.org http://www.ogre3d.org ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ icu-support mailing list - icu-support@... To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-support |
|
|
Re: HowTo Load ResourceBundlesYou may find the "Getting Started with ICU" tutorial helpful.
http://icu-project.org/docs/papers/GettingStartedwithICU_iuc28.ppt Pages 23-27 will be helpful for you. Page 27 will probably help you the most. George Rhoten IBM Globalization Center of Competency/ICU San José, CA, USA http://www.icu-project.org/ Kai Klesatschke <yavin@...> Sent by: icu-support-bounces@... 05/09/2007 02:22 AM Please respond to ICU support mailing list <icu-support@...> To ICU support mailing list <icu-support@...> cc Subject Re: [icu-support] HowTo Load ResourceBundles Nobody out there who can help a ICU newbie to get it integrated? I read the user guide but I didn't find a description how to get the thing working at runtime. UErrorCode error = U_ZERO_ERROR; mpResourceBundle = new ResourceBundle( "root", error ); I always get the error that the resource bundle is missing. I have to simple txt files compiled with genrb and packed with pakgdata: root.txt root { msg1 {"first msg"} msg2 {"second msg"} } de.txt de { msg1 {"erste msg"} msg2 {"zweite msg"} } I get root.res and de.res from genrb and mymsgs.dat,.dll from pkgdata. But I have no clue what I must do to get the resources in the generated files loaded with the ResourceBundle ctor. Kai Klesatschke schrieb: > Hello everybody, > > I integrated the ICU framework into my app to be unicode aware and to > externalize strings. I have a to locale files root.txt and de.txt with > nor further bundle structure. I compile the txt files with genrb and > package them together with pkgdata. The result is a myfile.dat. What do > I have to do to get the data in the generated file loaded with "new > ResourceBundle(...)"? > > Im using VC7.1 as IDE and the ICU C++ API. > > Regards -- kai klesatschke aka yavin http://www.ogre4j.org http://www.ogre3d.org ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ icu-support mailing list - icu-support@... To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-support ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ icu-support mailing list - icu-support@... To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-support |
|
|
Re: HowTo Load ResourceBundlesThanks very much for your reply. I think I already had a look into the
ppt. I read the pages 23-27 again and one of the issues I missed all the time is not mentioned. I had to set the application data directory before ICU initialization and resource loading, to get the framework find my dat file. The problem of the ICU doc is not missing information but structure. The docs about resource bundles don't point to the docs about ICU data, which is necessary to read if someone wants to use custom resource bundles in dat files. Is there a place I could upload a short step-by-step description how to use resource bundles? ------- 1. Read about how to setup resources with externalized string: http://icu-project.org/userguide/ResourceManagement.html root.txt de.txt 2. Compile the resources and package them to a dat file. root.res de.res package.dat 3. Read about how to load ICU dat files: http://icu-project.org/userguide/icudata.html UErrorCode error = U_ZERO_ERROR; u_setDataDirectory("dir/that/contains/your/datfiles") u_init(&error) new ResourceBundle( "package", error ); ------- George Rhoten schrieb: > You may find the "Getting Started with ICU" tutorial helpful. > http://icu-project.org/docs/papers/GettingStartedwithICU_iuc28.ppt > > Pages 23-27 will be helpful for you. Page 27 will probably help you the > most. > > George Rhoten > IBM Globalization Center of Competency/ICU San José, CA, USA > http://www.icu-project.org/ > > > > Kai Klesatschke <yavin@...> > Sent by: icu-support-bounces@... > 05/09/2007 02:22 AM > Please respond to > ICU support mailing list <icu-support@...> > > > To > ICU support mailing list <icu-support@...> > cc > > Subject > Re: [icu-support] HowTo Load ResourceBundles > > > > > > > Nobody out there who can help a ICU newbie to get it integrated? I read > the user guide but I didn't find a description how to get the thing > working at runtime. > > UErrorCode error = U_ZERO_ERROR; > mpResourceBundle = new ResourceBundle( "root", error ); > > I always get the error that the resource bundle is missing. I have to > simple txt files compiled with genrb and packed with pakgdata: > > root.txt > root { > msg1 {"first msg"} > msg2 {"second msg"} > } > > de.txt > de { > msg1 {"erste msg"} > msg2 {"zweite msg"} > } > > I get root.res and de.res from genrb and mymsgs.dat,.dll from pkgdata. > But I have no clue what I must do to get the resources in the generated > files loaded with the ResourceBundle ctor. > > > Kai Klesatschke schrieb: >> Hello everybody, >> >> I integrated the ICU framework into my app to be unicode aware and to >> externalize strings. I have a to locale files root.txt and de.txt with >> nor further bundle structure. I compile the txt files with genrb and >> package them together with pkgdata. The result is a myfile.dat. What do >> I have to do to get the data in the generated file loaded with "new >> ResourceBundle(...)"? >> >> Im using VC7.1 as IDE and the ICU C++ API. >> >> Regards > -- kai klesatschke aka yavin http://www.ogre4j.org http://www.ogre3d.org ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ icu-support mailing list - icu-support@... To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-support |
| Free embeddable forum powered by Nabble | Forum Help |