[Haskell-i18n] Some starters for the new list

Martin Norbäck d95mback@dtek.chalmers.se
15 Aug 2002 11:56:11 +0200


--=-O+2jlFuKXva/APRi1/Dt
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

tor 2002-08-15 klockan 10.28 skrev Ketil Z Malde:
> I just want to repeat something somebody suggested, and which I
> thought was a really neat idea:  Have string constants in programs be
> replaced by (Prelude.fromString "..") or similar, like numerical
> constants are handled already.
>=20
> This was suggested in order to simplify the use of PackedString, but
> I think it might come in handy for translation issues, too.  Granted,
> it's not a complete printf with argument permutation and all, but at
> least it should be extremely simple, and, hey, it'll probably suffice
> for *my* uses :-)
>=20
> (Naturally, the idea is that Prelude.fromString can be repaced by a
> function that looks the string up in a translation table, instead of
> using the default value.  Any reason this won't work?)

It would probably work, but doing it like this will probably doesn't be
a good solution for translation. Why? Because not all strings should be
translated. The programmer has to mark the strings that should be
translated, by using a function like gettext (or __).

Using it for PackedString should be good, something like template
Haskell could solve this without requiring more language extensions.

Regards,

	Martin

--=20
Martin Norb=E4ck          d95mback@dtek.chalmers.se             =20
Kapplandsgatan 40       +46 (0)708 26 33 60                   =20
S-414 78  G=D6TEBORG      http://www.dtek.chalmers.se/~d95mback/
SWEDEN                  OpenPGP ID: 3FA8580B

--=-O+2jlFuKXva/APRi1/Dt
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: För information se http://www.gnupg.org/

iD8DBQA9W3q7kXyAGj+oWAsRAp/jAJ92w23oy3ydoLr25pNmvs9tfCNsZwCdHbHT
pnY4gJ+MwZ+JupvfXU/ZzpQ=
=5WWT
-----END PGP SIGNATURE-----

--=-O+2jlFuKXva/APRi1/Dt--