directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1391434 - /directory/site/trunk/content/studio/internationalization.mdtext
Date Fri, 28 Sep 2012 12:51:39 GMT
Author: pamarcelot
Date: Fri Sep 28 12:51:38 2012
New Revision: 1391434

URL: http://svn.apache.org/viewvc?rev=1391434&view=rev
Log:
Added new converted pages to Studio's site.

Added:
    directory/site/trunk/content/studio/internationalization.mdtext

Added: directory/site/trunk/content/studio/internationalization.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/studio/internationalization.mdtext?rev=1391434&view=auto
==============================================================================
--- directory/site/trunk/content/studio/internationalization.mdtext (added)
+++ directory/site/trunk/content/studio/internationalization.mdtext Fri Sep 28 12:51:38 2012
@@ -0,0 +1,49 @@
+Title: Internationalization (i18n)
+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.
+
+# Internationalization (i18n)
+
+It exists a good guide on internationalisation (and externalizing string) at [How to Internationalize
your Eclipse Plug-In](http://www.eclipse.org/articles/Article-Internationalization/how2I18n.html).
+
+## Translating the current code
+
+Translating Studio is not an simple task. There are many files to translate :
+
+* messages.properties
+* plugin.properties
+* help files
+* some other semi-random files ;)
+
+## When writing code...
+
+When doing the translation for a specific language please add in any case the messages_\{language\}.properties
file of the language to the resource folder, even if it's empty (meaning all translations
are taken from the messages.properties file). This will show to other developers, that you've
thought about translation but no one was needed.
+
+Notes:
+
+* The message".properties files are located in the src/main/java/** folder (not following
maven's philosophy) to be able to use Eclipse' 'Externalize Strings' wizard also later on.
Following maven philosophy (*.properties in src/main/resources) the wizard doesn't finds the
created properties files anymore.
+* To replace placeholders we use Eclipse's NLS.bind function, e.g.
+
+        From messages.properties:
+        EditAliasesDialog.TheAliasBegin=The alias "{0}" is invalid.
+
+        Will look like in Java code:
+        NLS.bind( Messages.getString( "EditAliasesDialog.TheAliasBegin" ), new String[] {
alias } ) );
+
+Hints:
+
+* Using Eclipse' Property-Editor in the 'Properties' view will prevent you from comming into
troubles with uncomment characters like e.g. the German 'Umlauts'
\ No newline at end of file



Mime
View raw message