Rate this page:
Copy the file from your Crowd application directory into a temporary directory.
donna:lib dmcgahan$ cp crowd-language-1.5.1.jar ~/Desktop/crowd-language/.
Expand the JAR in the temporary directory.
donna:crowd-language dmcgahan$ jar -xvf crowd-language-1.5.1.jar created: META-INF/ inflated: META-INF/MANIFEST.MF created: com/ created: com/atlassian/ created: com/atlassian/crowd/ created: com/atlassian/crowd/console/ created: com/atlassian/crowd/console/action/ created: com/atlassian/crowd/security/ created: com/atlassian/crowd/security/demo/ created: com/atlassian/crowd/security/demo/action/ created: com/atlassian/crowd/openid/ created: com/atlassian/crowd/openid/client/ created: com/atlassian/crowd/openid/client/action/ created: com/atlassian/crowd/openid/server/ created: com/atlassian/crowd/openid/server/action/ inflated: com/atlassian/crowd/console/action/BaseAction.properties inflated: com/atlassian/crowd/security/demo/action/BaseAction.properties inflated: com/atlassian/crowd/openid/client/action/BaseAction.properties inflated: com/atlassian/crowd/openid/server/action/BaseAction.properties created: META-INF/maven/ created: META-INF/maven/com.atlassian.crowd/ created: META-INF/maven/com.atlassian.crowd/crowd-language/ inflated: META-INF/maven/com.atlassian.crowd/crowd-language/pom.xml inflated: META-INF/maven/com.atlassian.crowd/crowd-language/pom.properties
Once expanded, remove the original crowd-language-<version>.jar file from this temporary directory.
donna:crowd-language dmcgahan$ rm crowd-language-1.5.1.jar donna:crowd-language dmcgahan$ ll total 0 drwxr-xr-x 4 dmcgahan staff 136 Oct 15 16:27 . drwx------ 16 dmcgahan staff 544 Oct 15 16:25 .. drwxr-xr-x 4 dmcgahan staff 136 Oct 15 16:27 META-INF drwxr-xr-x 3 dmcgahan staff 102 Oct 15 16:27 com
In the temporary directory, modify each of the BaseAction.properties files with the new attribute translation. Apologies for my rough translation!
console.welcome Bienvenue à la foule console d'administration
If creating a new language translation for Crowd, you will need to rename each BaseAction.properties file in the temporary directory using the following format (e.g. for French, BaseAction_fr_FR.properties):
For more information on these codes please review the Locale javadoc. When finished the contents of your directories properties files should look similar to the following example (for our French translation):
./com/atlassian/crowd/console/action/BaseAction_fr_FR.properties ./com/atlassian/crowd/openid/client/action/BaseAction_fr_FR.properties ./com/atlassian/crowd/openid/server/action/BaseAction_fr_FR.properties ./com/atlassian/crowd/security/demo/action/BaseAction_fr_FR.properties
From within your temporary directory, create a new JAR for your translation:
donna:crowd-language dmcgahan$ jar -cvf crowd-language-<version>_<language-code>_<country-code>.jar *
So for our French translation example:
donna:crowd-language dmcgahan$ jar -cvf crowd-language-1.5.1_fr_FR.jar *
Place your new translation JAR in the crowd-webapp/WEB-INF/lib directory of Crowd and restart.
To set your locale for testing, simply add "-Duser.language=<language-code> -Duser.country=<country-code>" to JAVA_OPTS in Crowd's apache-tomcat/bin/setenv.sh:
JAVA_OPTS="-Xms128m -Xmx256m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8 -Duser.language=fr -Duser.country=FR" export JAVA_OPTS
or setenv.bat file:
set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx256m -Dfile.encoding=UTF-8 -Duser.language=fr -Duser.country=FR rem Checks if the JAVA_HOME has a space in it (can cause issues) SET _marker=%JAVA_HOME: =% IF NOT "%_marker%" == "%JAVA_HOME%" ECHO JAVA_HOME "%JAVA_HOME%" contains spaces. Please change to a location without spaces if this causes problems.
If you create a new language translation for Crowd that may be useful to others, please submit your translation to the Atlassian Plugin Exchange.
Please note that it is possible to add new language BaseAction_<language-code>_<country-code>.properties files to an expanded version of the existing crowd-language-<version>.jar file or modify the existing BaseAction.properties files for modifications to the default English text (e.g Crowd = Company's Crowd). However, we would love to get new translations and make them available for customers. To do this, the method described above is the best approach.
Rate this page: