473,387 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Multilanguage WebService?

Hi!
What are the best practises when building WebService
supporting multilanguage users?
For example, when WebService checks some business rules
and returns message to the user.
Best regards

Pawel
Sep 8 '06 #1
6 2427
"Pawe³ Piotrowski" <mr******@interia.plwrote in message
news:op***************@n1054.matrixnew.pl...
Hi!
What are the best practises when building WebService
supporting multilanguage users?
For example, when WebService checks some business rules
and returns message to the user.

These are the same rules for any multi-lingual application. There's nothing
special about web services, in this regard.

John
Sep 8 '06 #2
On Fri, 08 Sep 2006 18:23:41 +0200, John Saunders <john.saunders at
<"trizetto.com>"wrote:
"Pawe³ Piotrowski" <mr******@interia.plwrote in message
news:op***************@n1054.matrixnew.pl...
>Hi!
What are the best practises when building WebService
supporting multilanguage users?
For example, when WebService checks some business rules
and returns message to the user.


These are the same rules for any multi-lingual application. There's
nothing
special about web services, in this regard.

John

Do you mean for example propagate user culture to WebService by method call
and setting thread current culture and use ResourceManager?
Pawel
Sep 8 '06 #3
Internationalization of web services is an emerging field.

The is a draft specification WS-i18n (short for WS-internationalization)
that drafts specifications for passing locale, language, and formatting
information from a client to a web service.

If you're simply looking to return fault text, or response text in specific
languages, I believe the suggested practice is to push locale preferences
into the extensible SOAP headers. Keeping the method interfaces free of
locale information.

If you're using ASP.NET you can then extract that, creating a CultureInfo
object from that locale to pass to
System.Threading.Thread.CurrentThread.CurrentUICul ture. That way, if you
have localized text that you have stored in your resources the resource
manager will automatically handle getting the appropriate text, defaulting to
a neutral culture for that locale or defaulting to an invariant language.

--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"Paweł Piotrowski" wrote:
Hi!
What are the best practises when building WebService
supporting multilanguage users?
For example, when WebService checks some business rules
and returns message to the user.
Best regards

Pawel
Sep 8 '06 #4
"Peter Ritchie [C# MVP]" <PR****@newsgroups.nospamwrote in message
news:FC**********************************@microsof t.com...
Internationalization of web services is an emerging field.

The is a draft specification WS-i18n (short for WS-internationalization)
that drafts specifications for passing locale, language, and formatting
information from a client to a web service.

If you're simply looking to return fault text, or response text in
specific
languages, I believe the suggested practice is to push locale preferences
into the extensible SOAP headers. Keeping the method interfaces free of
locale information.

If you're using ASP.NET you can then extract that, creating a CultureInfo
object from that locale to pass to
System.Threading.Thread.CurrentThread.CurrentUICul ture. That way, if you
have localized text that you have stored in your resources the resource
manager will automatically handle getting the appropriate text, defaulting
to
a neutral culture for that locale or defaulting to an invariant language.
I haven't read the draft, but I would agree with Peter. I'd like to amplify
a few of his points:

1) One additional reason to use SOAP headers for the culture information is
that this is the way that recent web service enhancements have worked.
2) Be sure to pass something platform-independant between the client and
server. For instance, use the ISO country and culture codes, and stay away
from anything specific to .NET

John
Sep 8 '06 #5
"John Saunders" wrote:
2) Be sure to pass something platform-independant between the client and
server. For instance, use the ISO country and culture codes, and stay away
from anything specific to .NET
Agreed. The current ws-i18n notes describe locale as an ISO code like
en-us. It's also worth noting that locale should not be neutral, it should
always include a culture with the language--something you should always have
as a Windows client anyway. If your web service doesn't support translation
to that specific culture the resource manager will fall back to the neutral
language (i.e. if a client's culture is "fr-ca" and you only support "fr-fr"
and "fr", the resource manager will fall back to "fr" automatically. If you
don't support "fr" at all, but have set up an invariant language, the
resource manager will then fall back to that automatically).

As you pointed out John, this aspect of globalization is the same as a
"normal" .NET application.

Sep 8 '06 #6
Hi Peter,

I wrote an small implementation of WS-I18N for WCF. You can find it here,
http://www.codeproject.com/winfx/WSI18N.asp

Thanks
Pablo.

"Peter Ritchie [C# MVP]" <PR****@newsgroups.nospamwrote in message
news:FC**********************************@microsof t.com...
Internationalization of web services is an emerging field.

The is a draft specification WS-i18n (short for WS-internationalization)
that drafts specifications for passing locale, language, and formatting
information from a client to a web service.

If you're simply looking to return fault text, or response text in
specific
languages, I believe the suggested practice is to push locale preferences
into the extensible SOAP headers. Keeping the method interfaces free of
locale information.

If you're using ASP.NET you can then extract that, creating a CultureInfo
object from that locale to pass to
System.Threading.Thread.CurrentThread.CurrentUICul ture. That way, if you
have localized text that you have stored in your resources the resource
manager will automatically handle getting the appropriate text, defaulting
to
a neutral culture for that locale or defaulting to an invariant language.

--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"Pawel Piotrowski" wrote:
>Hi!
What are the best practises when building WebService
supporting multilanguage users?
For example, when WebService checks some business rules
and returns message to the user.
Best regards

Pawel

Sep 28 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Mariano López | last post by:
I'm trying to make a multilanguage website. When the user enters the site, I want to detect the language and automatically make a redirection. How can I do this? And how should I organize my data...
1
by: Tosch | last post by:
I have to write a multilanguage application with the following criteria: - The language code can be set in a config file or similar. I don't want .NET do decide which language to use. This way...
3
by: Olivier | last post by:
i need to create a multilinguage site and i need help : first i want to know what is the best and simple solution for a multilinguage site with plone 2? i want some tutorial, how to and if...
0
by: Giovane Calabrese | last post by:
ok. im try to make a multilanguage system based on that tutorial : http://www.123aspx.com/redir.aspx?res=29112 in my aspx pages all text are in labels , and i want to take the name labels...
1
by: Andrew Smith | last post by:
Hi, does anybody know to program multilanguage website, which are dependend on the browsers language settings? Does anybody know a nice jumpstart for this? Thanks in advance for any advice...
5
by: Michal Táborský | last post by:
I am wondering, if it's effective to use text arrays to store multilanguage information. We used to do it like this: CREATE TABLE product ( id serial NOT NULL, price float4, ... )
0
by: HelmutStoneCorner | last post by:
Hi, I am connected as a german client to a multilanguage server, Regional Options: English, US. Western Europe and US. The W2K Server (Terminal) -version: english(US) runs a french database. My...
15
by: AG | last post by:
I have seen the samples for multilanguage support regarding what is normally static content. Can anyone point me to a good sample for multilanguage support for dynamic content. Like a gridview...
1
by: paolob | last post by:
I need to provide multilanguage support to my application. I alredy writed a multilanguage test application, using VS6 and resource only dll. Now i'm using Visual Studio 2005, I find out that it...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.