[Seaside] Re: no HTML entities for 8bit characters in UTF-8 encoding

Avi Bryant avi at beta4.com
Fri Jun 25 23:46:39 CEST 2004


On Jun 25, 2004, at 1:35 PM, Colin Putney wrote:

> A while back I read a fascinating article on localization, but I 
> haven't been able to dig it up again. The one thing that stuck with me 
> though is the idea that localized strings should be functions, not 
> table lookups.
>
> So I suspect the right way to go about it would be to use no string 
> literals at all in the source code, but have method calls like:
>
> Localization youHaveKnives: 2.
>
> Strings that don't need to be parameterized can be unary selectors. 
> This lets all the different languages deal with their own 
> idiosyncracies correctly, while still giving a clean interface to the 
> programmer.

Yeah, I think I said much the same thing when we were discussing Babel. 
  IIRC, what I proposed then was something like

String>>localized
	^ self

Symbol>>localized
	^ Localization perform: self

Localization>>localized
	self subclassResponsibility

So you could still provide strings directly, or symbols to be looked 
up, or full objects that would do arbitrary things to come up with the 
right string.

Avi



More information about the Seaside mailing list