473,811 Members | 2,729 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Class Library & Localization

Hi Everyone,

I've been tasked with building a messaging service for a custom app that
supports localization. Within the app itself people will be able to specify
the languge of their choice and therefore can switch at run time.

However, the UI layer will send the locale of choice to my component and
then I must retreive and send standard messages based on this choice.

Is there best practive around doing something like this. Are resource files
the way to do this type of localization? How do I retreive these static
messages from a file based on the locale i was given?

Any code samples or links greatly appreciated.
Apr 26 '07 #1
1 3748
You set up the resource files for all of the different languages. Then you
can set the culture of the thread to the appropriate one, and it will
display the info from the resource file for that culture. For example, this
will set the culture to (general) French.

Thread.CurrentT hread.CurrentUI Culture = new CultureInfo("fr ");

Robin S.
-----------------
"Michael Morse" <Mi**********@d iscussions.micr osoft.comwrote in message
news:1C******** *************** ***********@mic rosoft.com...
Hi Everyone,

I've been tasked with building a messaging service for a custom app that
supports localization. Within the app itself people will be able to
specify
the languge of their choice and therefore can switch at run time.

However, the UI layer will send the locale of choice to my component and
then I must retreive and send standard messages based on this choice.

Is there best practive around doing something like this. Are resource
files
the way to do this type of localization? How do I retreive these static
messages from a file based on the locale i was given?

Any code samples or links greatly appreciated.

May 3 '07 #2

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

Similar topics

2
2061
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking afterwards with ILDASM at what is visible in those assemblies from a managed point-of-view I've noticed that: 1) for each managed and unmanaged C function (not C++ classes) I get a public managed static method (defined on a 'Global Functions' class) in the generated assembly with an export name of the form
6
1992
by: Rental | last post by:
I'm having the sam problem as described below with the Localization toolkit. Does anyone know if there is a solution to this problem. --->When attempting to generate resource dlls with --->LocalizationManagement.exe, I get an exception: --->Unable to generate loose file resources
2
1568
by: Julia | last post by:
Hi, We want to migrate out asp application to asp.net and take advantage on localization. I want to ask how it is advice to structure the site directory I am going to use resource only assemblies The site is an intranet site so I don't see problems to cache some resource
2
1267
by: Corvus | last post by:
We have a significant ASP.Net web application I am considering localizing to Spanish. All the .aspx and .aspx.cs files have hard-coded English. The issue is that we are a small company without any native Spanish speakers, and for business reasons we cannot send out our source files or spend much money on these conversions. What is the simplest, cheapest, fastest way to localize an existing ASP.Net application? The current plan is to...
2
2195
by: walter | last post by:
Hi there, I'm wondering if it's possible to store the .net resource in database instead of resx file? Our site is a multi-lingual site ,storing text in resx file give us a burden on the website deployment since the text is changed often. I'm thinking to store the text in database and establish a way to still leverage the localization feature provided by .NET framework.
5
2655
by: CMM | last post by:
I don't seem to "get" ASP.NET 2.0's Localization features. I've read up on everything... and of course, everything is explained in cursory softball terms- not any "real-world" usage way. I hope someone can give me a clue... Questions: 1) Do my eyes deceive me or is it true that localization is still totally utterly disengaged from the Designer and Property Editor... either in source
3
6471
by: Computer Guru | last post by:
I have a VB.NET 2005 application with several forms and a couple hundred "strings." I've been looking into all the localization improvements in VB.NET, and I can't seem to find anything that does what I'm looking for. My application has all the strings hard-coded, I wasn't planning on localizing it when I first built it. But that's OK, I am perfectly willing to re-create a resource file for en_US with the required data.
2
4288
by: Nathan Sokalski | last post by:
I am moving my website from my machine to my webhost, and need some help with what extra files I need to include due to the fact that I used AJAX in my site. Everything on the site is obviously functioning as desired when I test it on my machine using Visual Studio 2005. From what I have determined, the files I am forgetting are the JavaScript files from the Microsoft AJAX Library (See "To install Microsoft AJAX Library" at the bottom of...
1
6142
by: =?Utf-8?B?QU5lZWxpbWE=?= | last post by:
I am using C# and I created an .aspx page and the corresponding .aspx.cs code behind file. In the code behind file I have the following class structure public partial class myclass : page { private class nestedclass : myclass { public string getResourceString() {
0
9734
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9607
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10652
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10395
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10408
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10137
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9211
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
4346
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3026
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.