You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by ja...@apache.org on 2011/10/26 13:58:52 UTC

svn commit: r1189148 - in /incubator/rave/site/trunk/content/rave: documentation/translate-portal.mdtext images/screenshot_preference_preferred_language.png

Author: jasha
Date: Wed Oct 26 11:58:51 2011
New Revision: 1189148

URL: http://svn.apache.org/viewvc?rev=1189148&view=rev
Log:
Document how to add a new language to Rave portal

Added:
    incubator/rave/site/trunk/content/rave/documentation/translate-portal.mdtext
    incubator/rave/site/trunk/content/rave/images/screenshot_preference_preferred_language.png   (with props)

Added: incubator/rave/site/trunk/content/rave/documentation/translate-portal.mdtext
URL: http://svn.apache.org/viewvc/incubator/rave/site/trunk/content/rave/documentation/translate-portal.mdtext?rev=1189148&view=auto
==============================================================================
--- incubator/rave/site/trunk/content/rave/documentation/translate-portal.mdtext (added)
+++ incubator/rave/site/trunk/content/rave/documentation/translate-portal.mdtext Wed Oct 26 11:58:51 2011
@@ -0,0 +1,40 @@
+Title:     How to translate the portal
+Notice:    Licensed to the Apache Software Foundation (ASF) under one
+           or more contributor license agreements.  See the NOTICE file
+           distributed with this work for additional information
+           regarding copyright ownership.  The ASF licenses this file
+           to you under the Apache License, Version 2.0 (the
+           "License"); you may not use this file except in compliance
+           with the License.  You may obtain a copy of the License at
+           .
+             http://www.apache.org/licenses/LICENSE-2.0
+           .
+           Unless required by applicable law or agreed to in writing,
+           software distributed under the License is distributed on an
+           "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+           KIND, either express or implied.  See the License for the
+           specific language governing permissions and limitations
+           under the License.
+
+The labels in the portal are maintained in [Resource Bundles][1]. The default language of the portal is English. In this example you are going to add french translations to the portal.
+
+##1) Get Rave
+
+There are multiple ways to build your custom Rave instance, but the quickest is to use a Maven WAR overlay.  See [Extending Rave](rave-extensions.html) for an example overlay.
+
+##2) Add your translation
+
+  - Create a file `messages_fr.properties` in `src/main/resources`.
+  - Copy the contents from the [default language file][2] into your new file
+  - Translate the values
+
+##3) Build and test
+
+Build your custom Rave project and deploy it.
+You will see the French translations in the portal if the preferred language of your browser is French.
+
+![Setting French as preferred language in Firefox](/rave/images/screenshot_preference_preferred_language.png)
+
+
+[1]: http://download.oracle.com/javase/tutorial/i18n/resbundle/concept.html
+[2]: http://svn.apache.org/repos/asf/incubator/rave/trunk/rave-portal-resources/src/main/resources/messages.properties
\ No newline at end of file

Added: incubator/rave/site/trunk/content/rave/images/screenshot_preference_preferred_language.png
URL: http://svn.apache.org/viewvc/incubator/rave/site/trunk/content/rave/images/screenshot_preference_preferred_language.png?rev=1189148&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/rave/site/trunk/content/rave/images/screenshot_preference_preferred_language.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream