SourceForge.net Logo

texts.properties files

The files opencrx.text.properties and text.properties contain several strings used by JSP. These files must exist for each locale configured in openCRX. The following steps will guide you through the process of creating the files opencrx.text.properties and text.properties for the new locale xx_YY:

  • Create the new directory C:\temp\opencrx-core-CRX.war\config\texts\xx_YY

  • Decide which locale you want to use as a template (starting point) for your new locale xx_YY. In this example we will use en_US as a template. Hence, copy the files opencrx.text.properties and text.properties from the directory C:\temp\opencrx-core-CRX.war\config\texts\en_US to the newly created directory C:\temp\opencrx-core-CRX.war\config\texts\xx_yy

  • Open the file text.properties in the directory C:\temp\opencrx-core-CRX.war\config\texts\xx_YY with a text editor.

  • Each line of the file contains a name-value-pair of the form name=value. Replace the existing values with your translations and then save the file text.properties with all the changes.

  • Open the file opencrx.text.properties in the directory C:\temp\opencrx-core-CRX.war\config\texts\xx_YY with a text editor.

  • Each line of the file contains a name-value-pair of the form name=value. Replace the existing values with your translations and then save the file opencrx.text.properties with all the changes.

Use ISO 8859-1 character encoding for the files opencrx.text.properties and text.properties (the reason being that openCRX relies on the class java.util.Properties of the JavaT 2 platform). For characters that cannot be directly represented in this encoding, Unicode escapes are used; however, only a single 'u' character is allowed in an escape sequence. The JDK native2ascii tool can be used to convert property files to and from other character encodings (e.g. to convert a file texts.properties.uni to text.properties (ISO 8859-1 encoded) you could run native2ascii -encoding utf-8 texts.properties.uni texts.properties)

Example 4-8. extract from the file ...\en_US\text.properties - each line containing a name-value-pair

Locale=en_US
dir=ltr
LocaleTitle=English (United States)
CancelTitle=Cancel
OkTitle=OK
SaveTitle=Save
SortAscendingText=Click to sort ascending
SortDescendingText=Click to sort descending
DisableSortText=Click to disable sorting
DeleteTitle=Delete
EditTitle=Edit
...

If you don't feel like translating all the values, you can just leave the template values unchanged. However, it is important that the files opencrx.text.properties and text.properties exist for all configured locales and the files must contain all name-value-pairs.

http://www.crixp.com/ http://www.openmdx.org/