Hi!
Does i18n work in web service?
I append an i18n message in the response but it returned the key and not the message_value. e.g.(!msg.info.successful!)
Hi!
Does i18n work in web service?
I append an i18n message in the response but it returned the key and not the message_value. e.g.(!msg.info.successful!)
it depends what you want.
a webservice is running on the server, so, it will return the the translation, of the key in the language of the server OS.
When you run smart client, you want the language from the smart-client, so yes, than you send over the key-only, and do in the smartclient: var vMessage = i18n.getI18NMessage(‘i18n:1.mykey’)
or if you want servoy to be a webservice for everybody, than you need to return the value like this in the swebservice solution: i18n.getI18NMessage(‘i18n:1.mykey’)
Harjo:
it depends what you want.a webservice is running on the server, so, it will return the the translation, of the key in the language of the server OS.
When you run smart client, you want the language from the smart-client, so yes, than you send over the key-only, and do in the smartclient: var vMessage = i18n.getI18NMessage(‘i18n:1.mykey’)or if you want servoy to be a webservice for everybody, than you need to return the value like this in the swebservice solution: i18n.getI18NMessage(‘i18n:1.mykey’)
i am currently doing the latter (i18n.getI18NMessage(“msg.info.successful”) but unfortunately, it returned the key and not the value. If I ran my service as a normal solution in developer it gives me the translated message.
Maybe you didn’t set the i18nDataSource in that specefic webservice solution? (klik on the main node of your solution, and look for a property: i18nDataSource.
Harjo:
Maybe you didn’t set the i18nDataSource in that specefic webservice solution? (klik on the main node of your solution, and look for a property: i18nDataSource.
Cool! Silly me. Thanks alot!