|
Hello Prakash,
would you be available for consulting in a .NET localization project?
thanks
Tony
|
|
|
|
|
After generating the satellite assembly if we are deleting the .resx and .resource files and placing all the dlls in bin folder the application is not working. Then what is the use of creating the satellite assembly?
|
|
|
|
|
Does the satellite assembly work without the .resx and .resource files?
|
|
|
|
|
My vote of 5 for an excellent article on Localization using Resource file. Succinct and right to the point article, explains perfectly what is needed on localization.
|
|
|
|
|
Thanks for the article, it's great. It helped me, when I was creating a simple localization tool, but in the meantime I found program which does exactly the same and more.
LSACreator
It's free (non-commercial use or buy option) and it doesn't need Visual Studio or al.exe.
I'm using it to separate source project from language project.
modified 1-Feb-15 6:07am.
|
|
|
|
|
|
Very Nice article.
Thanks.
|
|
|
|
|
Wow this helped a lot and so easy to understand. Thanks!
|
|
|
|
|
superb article, the way it explains using example is great.....
|
|
|
|
|
Two questions though. It seems step A.2 is done automatically in .NET 4.0. Can you confirm this?
Also, is it possible for users (maybe admins) to add or alter resource files (or the dll's that are generated as MyApplication\bin\en-GB\MyApplication.resources.dll)?
Thanks and have my five.
It's an OO world.
public class Naerling : Lazy<Person>{
public void DoWork(){ throw new NotImplementedException(); }
}
|
|
|
|
|
For me, it was /embed's second parameter that I found explained here for the first time
|
|
|
|
|
Very substantial and laconic article.
|
|
|
|
|
|
The BaseName given in the description has not worked for me in .Net 3.5
After looking around I found a property BaseName in the resource itself.
ResourceManager resMgr = new System.Resources.ResourceManager(Properties.MyResource.ResourceManager.BaseName, Assembly.GetExecutingAssembly());
Kishore Vanapalli
|
|
|
|
|
easy to understand, nice article!
|
|
|
|
|
My Application name is Test App 2, and the resource file is Resource.nl-NL. Its full directory structure is C:\Users\admin\Documents\Visual Studio 2005\Projects\Test App 2\Test App 2\Prope
rties\Resource Set\Resource.nl-NL.resources.
Resgen works perfectly. However, on using the Assembly Linker tool with the following command,
al /t:lib /embed:"Resource.nl-NL.resources, Test_App_2.Resour
ce.nl-NL.resources" /culture:"nl-NL" /out:"Test_App_2.resource.dll"
However, i get the following error.
ALINK: error AL1022: Error reading embedded resource
'c:\Users\admin\Documents\Visual Studio 2005\Projects\Test App 2\Test
App 2\Properties\Resource Set\Resource.nl-NL.resources,
Test_App_2.Resource.nl-NL.resources' -- The system cannot find the file
specified.
My application namespace is Test_App_2, as i found out from the project in Visual Studios.
I would really appreciate if you could help me.
Thanks a ton.
|
|
|
|
|
That is so stupid, yet painful problem. To resolve this, you just need to remove space after comma, i.e. change:
/embed:"Resource.nl-NL.resources,[SPACE]Test_App_2.Resour
ce.nl-NL.resources"
to
/embed:"Resource.nl-NL.resources,Test_App_2.Resour
ce.nl-NL.resources"
|
|
|
|
|
Hi,
I am developing a business application iwth silverlight. I have tried localization from your article. Its fine.
but my requirment is not just in displaying labels and texblocks.
I want all details reading from database also to be in local language( or the language user chooses)
i want multi language support for my silverlight application
Pls help.
Manju
|
|
|
|
|
I tried both approaches, IMO al.exe cannot do the job correctly (or these internet-based instructions were wrong on how to link .resources file with appropriate assembly when producing dll file), correct me (or them) if I'm wrong.
Under http://msdn.microsoft.com/en-us/library/y99d1cd3(VS.71).aspx#[^], it is clearly stated how to manually add resource files to the project and edit them. More importantly, it is explained how to properly link resources with main assembly( new ResourceManager("...",typeof(Form1).Assembly); ), so you don't have to worry about faulty batch files when doing approaches 1 or 2.
Approach No.1 ( Assembly.GetExecutingAssembly() ) - has anybody made it at all?
Approach No.2 doesn't even have default (fallback) resource, so you have to worry about that also when shipping your app!
I suggest to let Visual Studio to do the job for you, it works out of the box, no pain.
|
|
|
|
|
What can i do if application is not has any form?
|
|
|
|
|
I made all the steps for building resource files with resgen.exe and al.exe and when I execute it locally in debug with VS2008 (3.5 framework target), everything is fine. My messages are translated without any problems. But when I publish my wcf services and asp.net application on a windows 2003 server with IIS 6.0, I get this error after a certain amount of time of inactivty, when I try to reload the same page. Anybody has an idea about this issue? I fetch my resource value with the "ResourceManager" object, with the GetString() method.
Thanks
below is the error :
========================================================================================
Server Error in '/' Application.
Could not load file or assembly 'ADP.PayConnexion.Business.Messages, Version=1.0.0.0, Culture=en, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'ADP.PayConnexion.Business.Messages, Version=1.0.0.0, Culture=en, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'ADP.PayConnexion.Business.Messages, Version=1.0.0.0, Culture=en, PublicKeyToken=null' could not be loaded.
=== Pre-bind state information ===
LOG: User = NT AUTHORITY\NETWORK SERVICE
LOG: DisplayName = ADP.PayConnexion.Business.Messages, Version=1.0.0.0, Culture=en, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///D:/ADP/PayConnexion_2008/UI/Web/
LOG: Initial PrivatePath = D:\ADP\PayConnexion_2008\UI\Web\bin
Calling assembly : ADP.PayConnexion.UI.Web, Version=1.0.0.0, Culture=en, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\ADP\PayConnexion_2008\UI\Web\web.config
LOG: Using host configuration file: \\?\c:\windows\microsoft.net\framework\v2.0.50727\aspnet.config
LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
|
|
|
|
|
Extract strings from code to resx and translate their automatically. Try RGreatEx[^] free.
|
|
|
|
|
I tried linking satellite assembly using the first way, but it doesn't work . The second way is pretty straight forward and it works fine. I am using VS2005. I am able to make the dll using Al.exe. Is this approach working for anyone else??
Cheers!!
|
|
|
|
|
Hi. I follow the B solution steps, but I put the resource files on another project inside the same solution. The system works fine, but I got the following error when I compile the resources project:
C:\Projetos\vs2k5\MDI\Idiomas\MDI.Designer.cs(38,25): error CS0234: The type or namespace name 'ComponentModel' does not exist in the namespace 'System' (are you missing an assembly reference?)
C:\Projetos\vs2k5\MDI\Idiomas\MDI.Designer.cs(53,25): error CS0234: The type or namespace name 'ComponentModel' does not exist in the namespace 'System' (are you missing an assembly reference?)
C:\Projetos\vs2k5\MDI\Idiomas\MDI.Designer.cs(22,21): error CS0234: The type or namespace name 'CodeDom' does not exist in the namespace 'System' (are you missing an assembly reference?)
Thats the code:
<br />
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]<br />
<br />
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]<br />
<br />
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]<br />
Using VC2005
Thanks
Valmir Cinquini
Notepad MVP
|
|
|
|
|
I kept getting AL1047 linker errors until I changed the linkder line to:
Al.exe /t:lib /embed:MyResource.en-GB.resources /culture:en-GB /out:MyApplication.resources.dll
|
|
|
|