Re: [Cppcms-users] Setting context.locale()
Brought to you by:
artyom-beilis
|
From: Julian P. <ju...@wh...> - 2010-08-28 19:22:16
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 28.08.2010 21:08, schrieb Julian Pietron:
> Hallo,
>
> context().locale("my_LC.enc"); does not work as I expect it to do.
> I configured the cppcms configuration to contain localization.locales [
> "en_US.utf8", "de_DE.utf8" ] and am now trying to store the user
> selected language in a cookie and read it back on each request and put
> it to context() by using context().locale(session().get("locale"));
> While the cookie contains the correct locale, a following call to
> context().locale().name(); does not read e.g. "de_DE.utf8", but instead
> reads "*" for default locale. So apparently the requested locale is not
> set on the context().
> What do I have to do to set the locale for context() successfully?
>
> Thanks,
> Julian
Used hello_locale example to test a bit around, and I realised, that
locale is set correctly, but the currently set locale is not returned by
context().locale(). Instead, the standard locale is returned ("*") I think.
Or do I have to use another call to get the locale's name like
"de_DE.utf-8"?
Thanks,
Julian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJMeWHeAAoJENidYKvYQHlQ7hYQAMcThPQR4Ydn4uFPnwmXuxQD
vj2oaNwx3b6WcwSNpy5TJR4V3Baa2/fXd8cjskFUuIbm/mG8dfU4PNwQHFbTSWeu
hQfzXPJp4cvJyJgOcCi2NVlrEZbBdqtxGJEonOf6eKJSkkNq3rwC0BKhyINV3EYF
JQza+kO4KcN/KVM8HhoDlf6ENtgYLaDVIKN5Z8CIghvhcUnRqiBv7GQ0FvHPrcVf
AaVeTIloLo5jTSY4J5oSn6SuNaofuIAH7KCmkUye+/yn8V792oUxq4gwGjNm1WhP
nF9yptfQL4CfX7ix+y5jq5YNUx+kuWiVfS/qAA9CJllL2qtu4eCr3uqepCb+2rgc
dRIPB3p/mmztG+7djPkLHwWIz/dilOevTDkMyjk1HVxC5WNbJRMXwPYtA1F3PJft
f4I0PoqAnL4VTKSH5zHjF+JsFtweZSU2J8pFQOjLJMcRQ6ulHciuLeVs1TW5/zW0
7rpUpl/e9HKYsOyDBtXcdxC1SBlIqAD2UeIKFAr2eNSMGta7w3LhtjyEc0pakLUR
Mm0RWKGvCtmDQle+5YECliOEcreWcCMTajwvgeLr4AwUjJegxYiTL+2/6ZMEyiqW
BLGKfxJg4u3Z3AB10h+M8xQ46lQDw25JhVu/Wrwx7jA0ev0wa4jrtAeEKT9dl6iH
dYUvNO8OjTlCMdtkv6P0
=ywJM
-----END PGP SIGNATURE-----
|