|
Hi,
I am working on Multilingual application.
But the problem is,I need to set the locale of the machine,it might be any language.
Whatever the locale of machine would have,the culture should be set .
Pooja
|
|
|
|
|
Mishra Pooja wrote: Whatever the locale of machine would have,the culture should be set .
Hi
I'm also having the same problem.
How you found solution?
Please let me know...
Thanks
rm_pkt
|
|
|
|
|
Finally I got the solution.
Just set the CultureInfo to the CultureInfo.CurrentCulture
like,
CultureInfo ci = CultureInfo.CurrentCulture;
label1.Text = resmgr.GetString("String1", ci);
This will add the culture specific text for "String1".
You need to create Culture specific resource files.
Very simple? That's .NET.
Enjoy .NET Coding.
Thanks
rm_pkt
|
|
|
|
|
When we run the "file based" resources in our app on multiple servers, we get file locks when trying to update the .resource file. We have a call to ReleaseResources() of the ResourceManager however it doesn't take effect on all servers. Do you have any advice on how to remedy this?
Thanks
Gennady Nurik
Director, Engineering
Parature, Inc.
http://parature.com
|
|
|
|
|
Good Article.
I have a small doubt regarding Globalization/Localization. Hope you can help me out.
I have a web form application where i need to provide more than 50 different localized resource supports. Apart from this, my application supports rich use of stored data (Sql Server Database) and obviously have few list of Listing controls (Repeater , Grid etc).
My requirement comes like this,
a) I need to provide full localized language support in all data which is displaying in each and every page. Regardless of, the name of controls, content of controls etc. To be concise, which ever text that i am displaying through page, need to be localized based on user selected language.
b) Each and every setup needs to contain all supported languages. So user can switch and view content of site in different language.
I stuck in,
1) I am not sure how to localize stored data in database.
2) How will I give or from where i generate localized information for all supported language.
It would be grate if you can help me out through your valid comments.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
I need to read some nonenglish context from a file and output it in TextBox. How do i inform the form what language to use? Language and Localization properties didn't work
|
|
|
|
|
I have a little app that generate resource files.
NOw i would like to press btnGenDLL and
this would create the bat file in the directory specified by the user
and the other bits and then run the al.exe programmatically.
Anybody any ideas how to do it?
thanks
vbnetuk@yahoo.co.uk
|
|
|
|
|
Where's the souce code download for the article? Harry
|
|
|
|
|
Well...
I don't really knows as i'm not the author of this article but you can take a look at
http://msdn.microsoft.com/msdnmag/issues/04/03/bugslayer/
or in your VS (2003) SDK at
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Samples\Technologies\Localization\CustomCulture
where an example is given.
If this can help you...
Best regards
Francis
|
|
|
|
|
It appears (after much trial and frustration) that the VS.NET IDE automatically parses all .resx files no matter whether or not they have a parent cs file. In building my resource files, I found if I just include the resource files directly into my project, then reference them as the resource base parameter when instantiating the ResourceManager object. For example, say you build localized resource files 'MyResource.LOCAL.resx' under the following folder:
\Include\Resources\*.resx
At build, the IDE will then compile those and automatically generate the \bin\LOCAL\*.dll for you.
So you'll end up with:
\bin\LOCAL (I.e. en-US)\PROJECT.resources.dll
Then in your C# code, just set the base to PROJECT.Include.Resources.MyResource an viola!
This occurred after having including my resource files into my project and continually having my generated *.dlls overriden each time I compiled. So now, I just include the resource files into my project, build, and the resource dlls are automatically generated.
|
|
|
|
|
I have create a resource manager in code
Friend rm As ResourceManager
I create a new instance of the resource manager
rm = New ResourceManager("BigByteTechnologies.LicenseManagement", Me.GetType().Assembly)
The application runs just fine but I can no longer edit the form.
This is a MDI form and the form name is frmMain, the exe name is LicenseManagement.exe which by the way I am creating with the intention of releasing here on codeproject as freeware to aid in creating licences for our apps
|
|
|
|
|
Hi
I want to store all my images within a resource file and then call them from my application. I am able to do this but things have changed and my application is not a .dll file that is called from a startup project which first checks for updates.
Where do i now put this resource dll and what do i call it, how do i display the images from this over forms in many projects?
Regards,
matt
|
|
|
|
|
Thanks for the article - it taught me what I needed to know. I am using the satellite assembly technique for my web app, and have created a batch file that makes it real simple to update my resource file. Maybe some others can benefit from it - it goes something like this (UpdateZH.bat):
<br />
path=%path%;C:\Program Files\Microsoft.NET\SDK\v1.1\Bin;C:\WINNT\Microsoft.NET\Framework\v1.1.4322<br />
<br />
resgen MyResource.ZH-cn.txt<br />
al.exe /t:lib /embed:MyResource.zh-cn.resources,MyApp.MyResource.zh-cn.resources /culture:zh-CN /out:MyApp.resources.dll<br />
move MyApp.resources.dll bin\zh-cn<br />
<br />
pause<br />
To use, replace MyApp with your assembly name, myresource with your resource name, and zh-CN with your culture identifier.
|
|
|
|
|
Thanks Steven,
Anything to make me go faster is a help.
|
|
|
|
|
Hi ,
Your article helped me a lot. But one point i have strucked assumption is that my existing assembly is strong named , now if i want to attached the locale specific it is fine if my created app is not strong named .If the app is strongly named , what are the other parameters should i use for the al.exe
Thanks
Roopesh
|
|
|
|
|
Hi,
you should use "/template:<your-assembly-with-strong-name>". Assembly linker will use your assembly's metadata to construct satellite assembly.
Wizard_01
|
|
|
|
|
Hi,
you should use "/template:<your-assembly-with-strong-name>". Assembly linker will use your assembly's metadata to construct satellite assembly.
Wizard_01
|
|
|
|
|
Hi,
you should use "/template:<your-assembly-with-strong-name>". Assembly linker will use your assembly's metadata to construct satellite assembly.
Wizard_01
|
|
|
|
|
I too am having issues with my application that I want to associate the satellite assembly with is strongly named.
I have tried using the /template option and this is not working.
I have also tried using the /keyfile option to use the same public/private key pair as I used in the main application.
If anyone knows something about this, please let us know!
Thanks
|
|
|
|
|
In the short time since I posted this, I finally found a fix for the issue!
To credit the source, it came from here:
http://www.codeguru.com/csharp/.net/net_general/tipstricks/article.php/c11367/
Below is the section that worked for me, where I needed to use the /template and /keyfile options together, AND it must use the same keyfile as the main application, according to the article.
al /embed:ExploreDotNet2005.Strings.en-US.resources
/out:ExploreDotNet2005.resources.dll /c:en-US
/template:../ExploreDotNet2005.exe /keyfile:../../..
/KeyPair.snk
|
|
|
|
|
I am sorry, may be what I will say have little connection with this subject.
I am now working on the localization of a product. I think what I should do is to create resource files in other language.
The string table editor of VC6 is not easy to use for non-developers.
I wonder if we could maintain the string table in an excel file just like "Writing Code for International Use" in MSDN. It will be easy for a group of non-editors to working on it and it is easy to review.
I wish what I have said make some sense.
With Regards,
Yours,
Ning Cao
|
|
|
|
|
Check out http://www.codeproject.com/tools/localizerc.asp which at least extracts all strings out of Your resources to a text file.
|
|
|
|
|
Actually this was exactly what i have been using for a year..
They use MS Excel to create multi language applications.
i dontnow if it is OK to write url of the tool because it si not free.
check www.swbox.com - tool called: StringDB
coldstone
|
|
|
|
|
You don't need to use the VS resource editor to modify the resource files. The .resx files are XML, which can be edited with a text editor or XML editor.
|
|
|
|
|
Nice article.
Once you create an satellite assembly then only you can make use of that. Iam not sure, isnt it pain to create satellite assembly each time you modify the resource file ? I am not sure is there any way to avoid this ?
Another question depending on the culture of the client I need to call the satellite assembly. How can I find this during runtime and call the appropriate satellite assembly?
Please let me know.;)
|
|
|
|