[Seaside] no HTML entities for 8bit characters in UTF-8 encoding
Avi Bryant
avi at beta4.com
Thu Jun 24 23:41:08 CEST 2004
On Jun 24, 2004, at 1:11 PM, Kamil Kukura wrote:
> Here is what I have for international texts. I have derived
> WALocaleComponent from WAComponent which has only #renderClass
> modified so it uses WALocaleHtmlRenderer. Such renderer has method
> #textOf: which looks to class' internal dictionary of texts according
> to given symbol.
I'm glad you brought this up, since localization is the next thing on
my agenda. I had intended for it to be part of the 2.5 release, but
this release process is dragging on too long as it is, so I think
instead it'll be the first feature addressed by 2.6. Once I get these
streaming and CSS issues fully worked out (soon!), I'll move 2.5 into
beta and start thinking seriously about locales.
A couple of notes in the meantime:
> This dictionary is fed from XML file like:
>
> <text id="buttonSend">An Unicode text encoded in UTF-8</text>
I'd rather not use external XML files, since they don't integrate well
with Smalltalk source control. The approach
that I'm taking with CSS right now is to have simple StringLibrary
classes that consist solely of unary selectors returning string
literals. I would think we could take the same approach here:
MyLocalLibrary>>buttonSend
^ 'An Unicode text encoded in UTF-8'
> However, I need one more method because I need handle cases such as:
> html submitButtonWithText: (html getTextOf: #buttonSend)
I think we could adopt a convention like
html submitButtonWithLabel: #buttonSend
which would be equivalent to
html submitButtonWithText: (html textForLabel: #buttonSend)
where #textForLabel: was implemented to first try to use #buttonSend as
a localization key, and if it didn't find anything it would default to
splitting it into words, ie 'Button Send'.
Avi
More information about the Seaside
mailing list