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

Help regarding localization.

Hi all,

I am having confusion regarding localization in .net.

I have one form on which i have some labels and button. After designing
that form what i did is set localization property of form to true and i
set language as french.

But still it is not changing caption of controls which are there in
form.

What should i do to make all content of all controls of form to french.

If anyone can shed some light on it then it will be really beneficial
for me.

thanks in advance.

Jun 19 '06 #1
5 2380
> I am having confusion regarding localization in .net.

I have one form on which i have some labels and button. After designing
that form what i did is set localization property of form to true and i
set language as french.

But still it is not changing caption of controls which are there in
form.

What should i do to make all content of all controls of form to french.

If anyone can shed some light on it then it will be really beneficial
for me.

thanks in advance.


It doesn't translate it for you automatically. Read up on "satellite
assemblies" for complete details.
Jun 19 '06 #2
hi,

thanks for your reply.

Let me explain in brief what i want.

I created one console application and one resx file. Then from this
resx file i generated another resource file with language as german.

then i generated resource file for this using resgen and then created
resource dll using al.exe

when i add this dll to bin folder and get message from this resource
file it is working properly.

But now here my problems start.

I have one windows application with some controls. What i did is i set
localization property of form to true and language as german. After
doing that file with name 'Form1.de.resx' is automatically generated.
But when i try to find out data of this resource file it is not showing
me anything. what i am expecting is it should alleast show me resources
which are there in original file i.e 'Form1.resx'

Can you tell me why this is happening. If i am wrong please correct me.

Thanks in advance.

Michael Brown wrote:
I am having confusion regarding localization in .net.

I have one form on which i have some labels and button. After designing
that form what i did is set localization property of form to true and i
set language as french.

But still it is not changing caption of controls which are there in
form.

What should i do to make all content of all controls of form to french.

If anyone can shed some light on it then it will be really beneficial
for me.

thanks in advance.


It doesn't translate it for you automatically. Read up on "satellite
assemblies" for complete details.


Jun 20 '06 #3
> I created one console application and one resx file. Then from this
resx file i generated another resource file with language as german.

then i generated resource file for this using resgen and then created
resource dll using al.exe

when i add this dll to bin folder and get message from this resource
file it is working properly.

But now here my problems start.

I have one windows application with some controls. What i did is i set
localization property of form to true and language as german. After
doing that file with name 'Form1.de.resx' is automatically generated.
But when i try to find out data of this resource file it is not showing
me anything. what i am expecting is it should alleast show me resources
which are there in original file i.e 'Form1.resx'

Can you tell me why this is happening. If i am wrong please correct me.


Please elaborate when you say "it is not showing me anything what (sic) i am
expecting ...". Presumably you mean at runtime (not build time). If you're
following the standard model for using satellite assemblies (probably),
you'll end up with one version of "<YourAppName>.resources.dll" for each
language you're supporting (after compiling your app). You'll find each
version in its own language directory so in your case look for it under a
"de" folder normally found under the "bin" directory off your program's main
(source) folder. This file will contain all embedded German resources for
your app including your "Form1.de.resx" file (stored in the ".dll" as
"<YourDefaultNamespace>.Form1.de.resources"). When you distribute your app,
you simply create a "de" subfolder under the main folder containing your
app's main ".exe" and copy the German version of
"<YourAppName>.resources.dll" to this directory. When the form is loaded, it
will then (normally) appear in German on a German version of Windows but for
any other version you normally have to invoke the following on the thread
that creates the form *prior* to loading the form (otherwise the OS's
default language will be used - note that you have to do this even in your
debug version which may be the problem you're experiencing):

Thread.CurrentThread.CurrentUICulture = new CultureInfo("de");

The form will now load in German.

Hope that helps.
Jun 20 '06 #4
Hi,
thanks for your reply.

basically my form1.resx has some controls and some strings.
When i change languate to german it has created new resx file with name
form1.de.resx but with no data in it. what i am expecting is it will
contains same resources as that of form1.resx which is not happening.

If i am wrong then please correct me

Thanks.
Michael Brown wrote:
I created one console application and one resx file. Then from this
resx file i generated another resource file with language as german.

then i generated resource file for this using resgen and then created
resource dll using al.exe

when i add this dll to bin folder and get message from this resource
file it is working properly.

But now here my problems start.

I have one windows application with some controls. What i did is i set
localization property of form to true and language as german. After
doing that file with name 'Form1.de.resx' is automatically generated.
But when i try to find out data of this resource file it is not showing
me anything. what i am expecting is it should alleast show me resources
which are there in original file i.e 'Form1.resx'

Can you tell me why this is happening. If i am wrong please correct me.


Please elaborate when you say "it is not showing me anything what (sic) i am
expecting ...". Presumably you mean at runtime (not build time). If you're
following the standard model for using satellite assemblies (probably),
you'll end up with one version of "<YourAppName>.resources.dll" for each
language you're supporting (after compiling your app). You'll find each
version in its own language directory so in your case look for it under a
"de" folder normally found under the "bin" directory off your program's main
(source) folder. This file will contain all embedded German resources for
your app including your "Form1.de.resx" file (stored in the ".dll" as
"<YourDefaultNamespace>.Form1.de.resources"). When you distribute your app,
you simply create a "de" subfolder under the main folder containing your
app's main ".exe" and copy the German version of
"<YourAppName>.resources.dll" to this directory. When the form is loaded, it
will then (normally) appear in German on a German version of Windows but for
any other version you normally have to invoke the following on the thread
that creates the form *prior* to loading the form (otherwise the OS's
default language will be used - note that you have to do this even in your
debug version which may be the problem you're experiencing):

Thread.CurrentThread.CurrentUICulture = new CultureInfo("de");

The form will now load in German.

Hope that helps.


Jun 21 '06 #5
> Hi,
thanks for your reply.

basically my form1.resx has some controls and some strings.
When i change languate to german it has created new resx file with name
form1.de.resx but with no data in it. what i am expecting is it will
contains same resources as that of form1.resx which is not happening.

If i am wrong then please correct me


It won't contain everything that's in "form1.resx" itself, only those
properties that you've explicitly changed into German (text strings only
typically). The entire form can basically be re-created using "form1.resx"
itself so "form1.de.resx" will be just a tiny subset of this normally
(containing German changes only). You need not worry about these details
however. The system will find everything it needs for you.
Jun 21 '06 #6

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

Similar topics

0
by: Amin Schoeib | last post by:
Hi, I am a Postgres newbie who worked until now with Oracle. Now I want to know if it is possible (when yes the how?) in Postgresql To set dynamically the Localization? For example in Oracle you...
1
by: KMILO | last post by:
Hello, Thanks ins advance for reading my message Im trying to use many .resx files for different webforms when I try to the project the following error appears: Could not find any resources...
2
by: Paul M | last post by:
Hi there, can anyone help me with this one.... i have a page which is in normal english format, but when i wanna change it to Russian format text, i set the Culture code, but it still remains...
6
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...
5
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...
2
by: bruno | last post by:
I need to localize my ASP.NET app and I just used "Tools" --"generate local resources" command and everything works fine in my WebForms. Resource file name is: MyWebForm.aspx.resx under a subDir...
3
by: Corey B | last post by:
I have an ASP.NET application that was built in ASP.NET v1.1. It has a SQL Server back end database. I have been asked to provide an estimate for the level of effort required to produce a Chinese...
3
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...
1
by: 2310b | last post by:
I have a web form in which i use OnPreRender to load controls. it works fine BUT no matter what other events I call, the OnPreRender keeps executing. If I click on one of the buttons to fire off...
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: 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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.