[Seaside] Localisation of Seaside apps

Martin J. Laubach mjl at laubach.at
Mon Jun 12 11:00:21 UTC 2006


  I just had to submit an offer for a web application with localisation.
After thinking a bit about it, I must admit that all my solutions so far
are rather unwieldly.

  Having separate #renderContentOn for each language smells pretty bad.
Code duplication and all that.

  The problem is not so much with small embedded descriptive strings
on a page (like "html text: 'Username'"), those I can just replace
with "html text: (TextCatalog at: #username)" or such.

  The real problem comes with larger texts with embedded links. Here,
not only the text changes, but also the link text and the link position.
For example: "Click <a>here</a> to register" gives "Zur Registrierung
klicken sie bitte <a>hier</a>".

  One could solve that by just dividing up the text as in

	html text: (TextCatalog at: #preLinkText).
	html anchorWithAction: [] text: (TextCatalog at: #linkText).
	html text: (TextCatalot at: #postLinkText).

  but this gets out of hand pretty fast. Not to mention that one
may have multiple links that get switched in position relative to each
other.

  That's one of the moments I think some template based preprocessor
would be nice. Or wouldn't it? I'm thinking of something like a way
to turn a string 'Click [here=self call: doRegistration] to register'
into a #renderContentOn-like method.

  Regards,

	mjl


More information about the Seaside mailing list