|
Is it possible to create one dll from N resx/resources files?
|
|
|
|
|
Yes.
Al.exe allows multiple /embed: args. You need this, for example, if you use WinRes to localize a form and want localized strings (say for showing in MessageBox.Show calls) in the same satellite assembly.
|
|
|
|
|
Hi,
If i consider performance of a website as a sole factor...
What decision do i take:
1) should i do localization using database
2) should i do locallization from resource file.(i will have to recompile over here)
3) shoudl; i do localization using xml file
Thanks
Terence
|
|
|
|
|
Hi, I hope someone can help me.
I have currently just taken a mock exam in preperation for Exam 70-316 and came across a question that asked me to select from a list of benefits to Hub and Spoke Deployment. I can't find any info on Hub and Spoke deployment in any of my C# or .NET books, can anyone help me on this one area?
For information the question reads like this:
Max is developing an application that will be developed around the world. The application will be based on the hub-and-spoke model of deployment. Which of the following benefits to him using the hub and spoke model? (Select all choices that are correct)
(a) Your application will have to be recompiled when changes are made to satellite assemblies.
(b) Initial cost of testing your application will be low
(c) The CLR will use a fallback process if a satellite assembly cannot be found
(d) All culture-specific resources can be grouped into a single assembly.
I have no idea and can't find any info on this anywhere, can anyone help or at least point me in the right direction?
Thanks
Steve G
Steve Gowland
|
|
|
|
|
|
as i see most people are looking for this..
this tool is not free but easy to use. StringDB Wizard by SWBOX.
regards.
coldstone
|
|
|
|
|
Hi ..
I have a small requirement .. its as follows. We have a webpage which displays a Value depending upon the language the user sets on the page.
If the user selects a language which is not supported by the webpage it should display the value of the default language.
We have used resource files for each languages ... and for default language
fallback used the following attribute.
en.resx is the file name for resource file 1
en-us.resx is the file name for resource file 2
But we are stuck with an error ... which is as follows
"The satellite assembly named "App_Web_dezxbda7.resources.dll, PublicKeyToken=" for fallback culture "en" either could not be found or could not be loaded. This is generally a setup problem. Please consider reinstalling or repairing the application"
or sometimes this error ...
"Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "MyResource.resources" was correctly embedded or linked into assembly "App_Web_7v0px3zw" at compile time, or that all the satellite assemblies required are loadable and fully signed."
Kindly suggest some ways to solve this ...
The code is as follows ...
imports system.reflection
imports system.threading
imports system.resources
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim NewRM As System.Resources.ResourceManager
NewRM = New ResourceManager("en", GetExecutingAssembly())
Try
Response.Write(NewRM.GetString("Test"))
Catch ex As Exception
System.Globalization.CultureInfo.CurrentUICulture)
Response.Write(ex.Message)
End Try
End Sub
End Class
|
|
|
|
|
Copy Satellite assmely to the following directory and try again directory "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\EN". may work sometime
|
|
|
|
|
Hi,
I am also getting the same error.
The satellite assembly named "sample.resources.dll, PublicKeyToken=cb764d326613eb9d" for fallback culture "en-US" either could not be found or could not be loaded. This is generally a setup problem. Please consider reinstalling or repairing the application.
Thanks in Advance
|
|
|
|
|
plz tell me what value does the ----messageId ---- will have as you had used this in the code
success is never far but it is hard to get
|
|
|
|
|
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
|
|
|
|