You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by bb...@apache.org on 2008/04/03 17:09:16 UTC
svn commit: r644409 - in
/incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets: i18n/
i18n/nls/ i18n/nls/en/ i18n/nls/en/strings.js i18n/nls/strings.js
src-js/Internationalization.js
Author: bbuffone
Date: Thu Apr 3 10:09:14 2008
New Revision: 644409
URL: http://svn.apache.org/viewvc?rev=644409&view=rev
Log: (empty)
Added:
incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/i18n/
incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/i18n/nls/
incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/i18n/nls/en/
incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/i18n/nls/en/strings.js
incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/i18n/nls/strings.js
incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/src-js/Internationalization.js
Added: incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/i18n/nls/en/strings.js
URL: http://svn.apache.org/viewvc/incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/i18n/nls/en/strings.js?rev=644409&view=auto
==============================================================================
--- incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/i18n/nls/en/strings.js (added)
+++ incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/i18n/nls/en/strings.js Thu Apr 3 10:09:14 2008
@@ -0,0 +1,14 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+ "string1":"An english string",
+ "string2":"A second english string"
+})
\ No newline at end of file
Added: incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/i18n/nls/strings.js
URL: http://svn.apache.org/viewvc/incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/i18n/nls/strings.js?rev=644409&view=auto
==============================================================================
--- incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/i18n/nls/strings.js (added)
+++ incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/i18n/nls/strings.js Thu Apr 3 10:09:14 2008
@@ -0,0 +1,14 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+ "string1":"default string 1",
+ "string2":"default string 2"
+})
\ No newline at end of file
Added: incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/src-js/Internationalization.js
URL: http://svn.apache.org/viewvc/incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/src-js/Internationalization.js?rev=644409&view=auto
==============================================================================
--- incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/src-js/Internationalization.js (added)
+++ incubator/xap/tags/XAP_0.5.0/samples/WebContent/examples/widgets/src-js/Internationalization.js Thu Apr 3 10:09:14 2008
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ *
+ */
+
+Xap.require("dojo.i18n.common");
+dojo.requireLocalization("widgets.i18n", "strings",null,"en,ROOT");
+
+
+Internationalization = function(){
+}
+
+
+//Makes the scrollpane take up the remainder of the screen
+//Some issues with IE and FF differences
+Internationalization.prototype.getString = function( stringName ){
+ //TODO make this use dojo i18n stuff
+ return dojo.i18n.getLocalization("widgets.i18n", "strings")[stringName];
+}
+