Go Back   SmartClient Forums > Technical Q&A
Wiki Register Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 11th Jan 2011, 00:30
ThomasH ThomasH is offline
Registered Developer
 
Join Date: Aug 2009
Posts: 119
Default 18 language packs in SC 8

Hello,

I have read here
http://blog.isomorphic.com/?p=145

that SmartCleint 8 supports

"18 language packs: SmartClient and SmartGWT are now single-sourcing language packs. All common locales are covered."

How can I switch the Framework messages like "OK", "Cancel" etc. between the 18 language packs? I could not found anything in the documentation.

Regards Thomas
Reply With Quote
  #2  
Old 11th Jan 2011, 03:57
claudiobosticco claudiobosticco is offline
Registered Developer
 
Join Date: Sep 2008
Posts: 350
Default

speaking of SmartClient LGPL latests nightly builds, it seems that frameworkMessages.properties is missing.
Reply With Quote
  #3  
Old 12th Jan 2011, 15:31
Isomorphic Isomorphic is offline
Administrator
 
Join Date: May 2006
Posts: 30,524
Default

Indeed it is! :(

The standard localization files may be downloaded here. Unzip them into smartclientSDK/isomorphic/ and smartclientRuntime/isomorphic/, so that the locales/ directory is alongside system/ and modules/.

To test that localization works, open up the Feature Explorer, then navigate to Extending->Localization on the example tree on the left. You should be able to select different languages, click "Change Locale" and see the UI change on reload (as the documentation for the example describes).

This fix will appear in tonight's (2011-01-13) autobuild, and in the next SmartClient release. (The 2011-01-12 build has an incomplete fix which contains an error, but happens to work in Firefox 3.6.)

Regarding documentation: See the "I18N" entry in the SmartClient 8.0 Reference Explorer, which is included in the 8.0 LGPL/Eval packages. (The documentation on the SmartClient website is in the process of being updated.) The section "Framework message localization" covers how to include locale files in your website.

(edit: fixed zip link, added documentation comments)

Last edited by Isomorphic; 12th Jan 2011 at 15:45..
Reply With Quote
  #4  
Old 25th Jan 2011, 01:11
ThomasH ThomasH is offline
Registered Developer
 
Join Date: Aug 2009
Posts: 119
Default

Thank you, that seems to work now. But there are still two issues left:

1. The localization example does not work properly with Chrome, for example the hover of the date picker is still English, but the picker itself is translated. With IE/FF this works correctly

2. The language pack files have no extension (Example: <SCRIPT SRC="isomorphic/locales/frameworkMessages_pt.properties" />), and therefore they are not accessible trough IIS without adding a mime type for it. I suggest adding the .js extension to the language files (Example: <SCRIPT SRC="isomorphic/locales/frameworkMessages_pt.properties.js" />), that is much cleaner and they could be used without modifying IIS config.

Greetings Thomas
Reply With Quote
  #5  
Old 25th Jan 2011, 16:37
Isomorphic Isomorphic is offline
Administrator
 
Join Date: May 2006
Posts: 30,524
Default

With what build are you seeing issue #1? There was an issue like that, corrected after 8.0, which should not happen with the latest nightly.

On #2, the browser doesn't usually care what mime-type the server returns if you are pointing at a file via a <script src=> tag - this should work with IIS unless IIS actually refuses to serve the file at all.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search


© 2010,2011 Isomorphic Software. All Rights Reserved