The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Per Process Locales for Cincom Smalltalk

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Per Process Locales for Cincom Smalltalk Posted: Oct 8, 2007 2:45 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Per Process Locales for Cincom Smalltalk
Feed Title: Michael Lucas-Smith
Feed URL: http://www.michaellucassmith.com/site.atom
Feed Description: Smalltalk and my misinterpretations of life
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Michael Lucas-Smith

Advertisement

When we decided to commercially support Seaside for Cincom Smalltalk we took a step back and looked at the small things we could quickly do that would help out our users. One obvious thing was internationalization of web applications.

VisualWorks already has a great deal of internationalization support, from UserMessages for translations to Locale based numerics, dates, times, etc. However, these settings are global to the image. That's not so useful if you're building a web application.

So with Seaside, it was clear we could take advantage of the process model and make all Locale support act on a per-process basis. This provides a great deal of flexibility for people building Web Services, socket based applications, Web Applications in Web ToolKit, VisualWave and Seaside and simply presenting a user interface in multiple languages on different screens.

This behavior should appear in the next version of Cincom Smalltalk - that means you'll pick it up in both VisualWorks and ObjectStudio 8 when they release their next versions.

How does this relate to Seaside? There was a question posted in response to our recent podcast on Seaside in Cincom Smalltalk asking why wouldn't we set up our locales to be specific to sessions. Good news Philippe, we did! - as a request comes in for Seaside, the current locale is extracted from the session and applied to the running process. In effect, each request that comes in gets specialized to the desired Locale. As an added bonus, changing the locale stores the change back in to the session.

We include in our Seaside distribution a test for internationalization of this nature. The work for this was done by Martin Kobetic and reviewed by Steve Dahl, Tamara Kogan and myself. So if we break anything with the change, you know where we live.. well, where I podcast at least.

To use the localization behavior, you can access it directly on the session object inside a WAComponent, eg:

self session availableLocales.

self session locale.

self session locale: self session availableLocales last.

Locale current languageID.

(#translatedString << 'Translated String' >> #myDemoApp)

Read: Per Process Locales for Cincom Smalltalk

Topic: Smalltalk Daily 10/5/07: A Sneak Peek at Seaside Support in CST Previous Topic   Next Topic Topic: File Based Smalltalks; A Camp Smalltalk Nostalgia Point

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use