473,411 Members | 2,184 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,411 software developers and data experts.

mulyiple language in c#.net application

Hi this sarav...

I having some languages in dropdownlist(like
english,tamil,japan.......)

based on this dropdown selection full application need to change
corresponding language..
Anyone give solution for this

Sep 12 '06 #1
2 1769
Hi Sarav,

Using a satellite assemblies for all your languages you can swap between
them by setting CurrentCulture/CurrentUICulture

This sample is for a web app, but the same applies for windows apps.
Google for 'satellite assemblies'

http://www.codeproject.com/aspnet/Sa...Assemblies.asp

On Tue, 12 Sep 2006 07:50:20 +0200, <sa************@gmail.comwrote:
Hi this sarav...

I having some languages in dropdownlist(like
english,tamil,japan.......)

based on this dropdown selection full application need to change
corresponding language..
Anyone give solution for this


--
Happy Coding!
Morten Wennevik [C# MVP]
Sep 12 '06 #2
Hi Sarav...

I am not sure you are develop standalone app or web app
For my experience, I am develop multilanguage webapp as follow

1. Create a text file, and store your text in name-pair format, e.g.
lblFirstName=First Name
lblLastName=Last Name
If you are stored english, please save the file in Resource.txt, if you are
save Traditional Chinese, please save the file in Resource.zh-hk.txt
It is not compulsory, just for easy maintenance

2. Download .Net SDK, and locate the tool
regen.exe
al.exe
and execute following, e.g. English
resgen Resources.txt Resources.resources
al /t:lib /embed:Resources.resources /culture:en
/out:%APP_ROOT%\Resources.dll

e.g. Traditional Chinese
resgen Resources.zh-hk.txt Resources.zh-hk.resources
al /t:lib /embed:Resources.zh-hk.resources /culture:zh-hk
/out:%APP_ROOT%\zh-hk\Resources.resources.dll

Please remember that using sultable culture to compile the resource file,
and the compiled dll file must placed under the bin of your application
root.
If it is English resource, just placed under the application root/bin, if it
is other than English, then you need create the folder, with the culture
name, under the application root/bin, and place the dll inside.

3. In your application, for example, cs file, add some code to get the text
from the resource file
// get the language package
Thread.CurrentThread.CurrentUICulture = new CultureInfo(language); //
language should be "en", "zh-hk" or other microsoft acceptable culture code

Assembly assembly = Assembly.Load("Resources");
resources = new ResourceManager("Resources", assembly);

// if you like to get the text of lblFirstName, then
string text = resources.GetString("lblFirstName");

Hope this can help you


<sa************@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi this sarav...

I having some languages in dropdownlist(like
english,tamil,japan.......)

based on this dropdown selection full application need to change
corresponding language..
Anyone give solution for this

Sep 12 '06 #3

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

Similar topics

33
by: Quest Master | last post by:
I am interested in developing an application where the user has an ample amount of power to customize the application to their needs, and I feel this would best be accomplished if a scripting...
8
by: Hermawih | last post by:
Hello , I want your opinion about this . In order to say it clearly , I think I have to describe it in long sentences . I could consider myself as Intermediate/Advance Access Developer ;...
6
by: Wiktor Zychla | last post by:
I've downloaded the polish language pack for .Net Framework 1.1 and I've installed it. Now I expect to see any exception messages in my native language but I still get english texts in exception...
3
by: - HAL9000 | last post by:
Hello, Background: I am familiar with VB.NET, vanilla C++, and Pascal but not Csharp. Please confirm/comment: If I want to get a windows application running quickly (and minimize total...
2
by: Chance Ginger | last post by:
I am rather new at Python so I want to get it right. What I am doing is writing a rather large application with plenty of places that strings will be used. Most of the strings involve statements of...
25
by: Dave | last post by:
I want to spend two minutes on my soapbox. I love C#. I am so productive in it it's ridiculous. But it's so easy to write code that uses poor design principles. Example: just making...
1
by: saravanan.arul | last post by:
Hi this sarav... I having some languages in dropdownlist(like english,tamil,japan.......) based on this dropdown selection full application need to change corresponding language.. Anyone...
4
by: Paciente8159 AKA Klayman | last post by:
Hi, I have a couple of doubts reggarding a plugin based application in C++? I want to build a c++ plugin based app. I have searched alot of things in the net but I still don't know how to...
10
by: NUPUL | last post by:
Hi, I have a few questions to ask with the use of C++ per se: 1. For what type of applications is C++ actually used/preferred/ chosen? 2. ANSI C++ doesn't have any support for GUI...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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,...
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...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.