On 09/20/2010 03:18 PM, Rob Crittenden wrote:
Adam Young wrote:
This is the simplest, most global approach to I18N.  It does complete
I18N on the server side by setting the locale on each request, based on
the value in the http header.

If we go this route, I can remove the parameter as a parameter on the
metadata plugin



To test this:

curl -H "Content-Type:application/json" -H "Accept:applicaton/json" -H
"Accept-Language:uk" --negotiate -u : --cacert /etc/ipa/ca.crt -d
'{"method":"plugin_metadata","params":[[""],{"all":true}],"id":6}' -X
POST http://localhost:8888/ipa/json | grep label


And note that is should work for any RPC. For example


:"user_find","params":[[""],{"all":true}],"id":6}' -X POST
http://localhost:8888/ipa/json | grep summary
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 13114 0 13114 0 58 42902 189 --:--:-- --:--:-- --:--:-- 42996
"summary":
"\u0432\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e
\u0432\u0456\u0434\u043f\u043e\u0432\u0456\u0434\u043d\u0456\u0441\u0442\u044c
7
\u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0456\u0432",
[ayo...@ipa freeipa]$ curl -H "Content-Type:application/json" -H
"Accept:applicaton/json" -H "Accept-Language:es" --negotiate -u :
--cacert /etc/ipa/ca.crt -d
'{"method":"user_find","params":[[""],{"all":true}],"id":6}' -X POST
http://localhost:8888/ipa/json | grep summary
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12917 0 12917 0 58 48572 218 --:--:-- --:--:-- --:--:-- 48743
"summary": "7 usuarios coincidentes",


ack. We'll need to ensure that Apache is running in forking mode to be safe, we have a separate ticket open on that.

rob
0038 pushed to master. I'll redo the original patch without the expliciet I18N support

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to