14.01.2013 Views

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

11.1.3. Adding a non-supported Locale<br />

generated resource bundle. After you have done this, make sure you uncheck the<br />

checkbox Override NLS Resource Bundle Entries to preserve your changes when you<br />

generate your application again.<br />

If you want to generate your application using a locale that is not supported out of the<br />

box, you can do so by performing the following steps:<br />

1. Create a new version of GeneratorText.properties for your own locale. You can<br />

find these files in the folder \templates\nls.<br />

2. Specify the locale in either the Generator Default Locale property or in the<br />

Generator Locales property.<br />

3. Generate the application.<br />

4. Translate the entries in the generated Resource Bundle for your locale.<br />

5. Uncheck checkbox Override NLS Resource Bundles in the Application<br />

Definition, to preserve your translations. <strong>JHeadstart</strong> will then only add new<br />

keys, not change existing ones.<br />

6. Modify \jheadstart\messages.js and add messages in<br />

your language. This file contains JavaScript messages.<br />

7. Add entries in your Resource Bundle for the JHS-messages (open<br />

jhsadfrt_source.zip and view the contents of the<br />

JhsUserMessages_.java file for example messages).<br />

Attention: The recommended type for Resource Bundle is java instead of<br />

propertiesfile if you have special characters in your language. Make sure you<br />

compile (rebuild) the Java Resource Bundle after you have added new entries,<br />

otherwise <strong>JHeadstart</strong> Application Generator will erase them the next time you<br />

run.<br />

8. Make sure that your application users set the same locale in the browser and in<br />

their operating system (Windows: Control Panel – Regional Options). Some<br />

language dependent features (in particular ADF Faces) use the browser locale,<br />

others the Windows locale.<br />

Suggestion: If your language contains special characters that are not properly<br />

shown in the resulting application, consider using Unicode notation. The tool<br />

native2ascii (see<br />

http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/native2ascii.html )<br />

can help you get the right Unicode for a specific text.<br />

11 - 4 Internationalization <strong>JHeadstart</strong> Developer’s <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!