[Seaside] Bootstrap multilingual?

Smalltalk smalltalk at adinet.com.uy
Mon Sep 3 18:59:42 UTC 2018


Hi,

There is in Seaside Gettext for internationalization.

But I use my own solution for internationalization with Seaside + 
GemStone/S in a very simple way.
String
translateFor:
^self getInternationalization getTranslationFor: self in: userObject 
languageName

getInternationalization - answer an instance of 
ApplicationInternationalization (a singleton)
ApplicationInternationalization has a [languageDictionaries] instance 
variable where the translations are stored.
languagesDictionaries at: #german - is the german dictionary (the key is 
an english string and the value is the german translation).

languageName- is the selected default language of the logged user

 From Seaside most of String are like:
('My String' translateFor: self session user).

Link:
https://github.com/brunobuzzi/AbstractApplicationObjects/tree/master/repository/AbstractApplicationObjects.package/ApplicationInternationalization.class

A very simple approach that happens to work :)

The downside is you have to be carefull with strings at domain model 
(you will need a double translation).
For this problem i use:
https://github.com/brunobuzzi/AbstractApplicationObjects/tree/master/repository/AbstractApplicationObjects.package/ApplicationReverseTranslation.class

regards,
bruno

El 28/08/2018 a las 18:36, Jeff Gray escribió:
> Can Seaside Bootstrap handle internationalisation?
>
>
>
> --
> Sent from: http://forum.world.st/Seaside-General-f86180.html
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


---
El software de antivirus Avast ha analizado este correo electrónico en busca de virus.
https://www.avast.com/antivirus



More information about the seaside mailing list