Localization :: Use The Same "Name" In Local And Global Resource File?
Oct 11, 2010Can i use the same "Name"(value is different) in both local and global resource file(.resx) and refer both in same page in VB.NET (VS2008).
View 1 RepliesCan i use the same "Name"(value is different) in both local and global resource file(.resx) and refer both in same page in VB.NET (VS2008).
View 1 RepliesI need to create both local and global resource file in VB.NET. And also i need to use both resource file in a single page. how to create and use in VB.NET (VS2008).
View 3 RepliesI have translated Text Ok in arabic and I have that placed in global Navig.resx file
<asp:Button
ID="btnReasonOK"
runat="server"
Text="<%= Resources.Navig.OK%>"
When I run it I see <%= Resources.Navig.OK%> itself.Actually I should get translation of Ok.
i have a very strange error.i get parser error Parser Error Message: The resource object with key 'TopnavHome' was not found.this is the code: [Code]....
BUT, if i do this: [Code]....
How can I use an image or icon resource from global resource file in an asp:Image control to set the ImageUrl attribute?
View 1 RepliesIn our web application we need to keep various company's settings. For eg "DiamondProdRefIDCaption","Shippingpickup","ZipCodeCaption","DefaultCountry","AllowToEditInvoice", etcThese settings are different for various companies and are placed in web.config as key-value pair.Initially, we have tried do simplify this process by adding a company_settings table in the DB so as to allow us to add companies on the fly. However, this method makes it very difficult to add a new setting
<%$Resources:DiamondProdRefIDCaption%>
We are migrating the VB6 applications into VB.NET (2008). They implemented the globalization in the Vb6 application by storing the english strings and corresponding langauage text (italian,spanish or french) in Database(SQL). Now we need to create a resource file in VB.NET(2008) for each language. Instead of creating resource file manually we want to write an application which will create resource file dynamically for each language and copy the english string and correspoding language text value from database into resource file.
SLNo Language English Value
1 English Name Name
2 Italian Name Nome
3 Spanish Name nombre
In my project i add a reference of one dll and it has some resource files(.resources). Also my project has some resource files with the same language name(Spanish, french and Germany). Also i think we can't add the two resource file for one language. Now how can i mangage both the resource files?
View 1 Repliesneed to bind a resource file using system culture info. Say for example, if my system culture is Spanish(Spain) "es-ES" then i have to look for "es-ES" resource file to bind. If it is not there then i have to bind with default resource file ('en-US"). How to do this?
View 3 RepliesIn our web application we need to keep various company's settings. For eg "Shippingpickup","ZipCodeCaption","DefaultCountry","AllowToEditInvoice", etc
These settings are different for various companies and are placed in web.config as key-value pair.
Initially, we have tried do simplify this process by adding a company_settings table in the DB so as to allow us to add companies on the fly. However, this method makes it very difficult to add a new setting since it would require us to add a column to the company_settings table and thus would require code changes as well as stored procedure changes.
Now we have added separate global resource files for each company's settings. But, whenever we want to add new company to our website, we need to add a new resource file for that company. Adding a resource file requires compilation, and thus the application needs to be restarted. I was wondering if there is a way that we can add a new resource file dynamically at run-time.
Or are resource files not the right thing to use here? Is there a better method of tackling this issue?
I need to be able to change the resource file used by an ASP.Net Page based on some value other than Culture/Language/Region. The purpopse is to simply configure properties on the page based on a city or site name or other criteria. I do not want to change language or culture/region.
View 1 RepliesI'm developing two applications. One is server application and one more is client application and i'm implementing Localization in both the applications. I have used 7 language resource files in both the application. I need to add the reference of server application in my client application to access some global methods and all. After i'm adding the resource file in the application if i build the application it creates folder for each resource file with language culture code (Spanish -> es-ES, French -> fr-FR) under Bin directory.
Similarly if i add the reference of server application into client application then the resource file dll of server application will be added under corresponding langauge culture folder(es-ES,fr-FR) in the Bin directory. But i don't want to create any resource file dll for the application under Bin directory and aslo i need to put all the resource files inside the application only.
I have a web application project with a App_GlobalReousrces folder which contains a *.resx file that I would like to access (read) from a separate class library project.
What's the best way to deal with this one?
Saving resource file at runtime -Access denied error
View 2 Repliesi'm using a little javascript in my website for my navigation bar, which is made up of a few ImageButton controls. in the code behind i have this:
Dim homeImage As String = GetLocalResourceObject("HomeImage")
imgBtnHome.Attributes.Add("OnMouseOver", HomeImage)
and in the resx file, i've tried these, but they don't work: (note the single and double quotes)
key: HomeImage value: "this.src='images/HomeImage.gif'"
key: HomeImage value: "this.src='images/HomeImage.gif'"
is it even possible to read "quoted" text from a local resource file?
When I run the application using the Web Developer it works fine. However when I run it using local IIS I get the following error:
The resource class for this page was not found. check if the resource file exists and try again. Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The resource class for this page was not found. heck if the resource file exists and try again.
Source Error:
Line 81: private void PopulateLanguageList()
Line 82: {
Line 83: DropDownListLanguage.Items[0].Text = (string)HttpContext.GetLocalResourceObject(
Line 84: "Default.aspx", SelectLanguage, Thread.CurrentThread.CurrentCulture);
Line 85: }
Stack Trace:
[InvalidOperationException: The resource class for this page was not found. Please check if the resource file exists and try again.]
System.Web.Compilation.LocalResXResourceProvider.CreateResourceManager() +4038050
System.Web.Compilation.BaseResXResourceProvider.EnsureResourceManager() +23
System.Web.Compilation.BaseResXResourceProvider.GetObject(String resourceKey, CultureInfo culture) +24
System.Web.Compilation.ResourceExpressionBuilder.GetResourceObject(IResourceProvider resourceProvider, String resourceKey, CultureInfo culture, Type objType, String propName) +32
System.Web.HttpContext.GetLocalResourceObject(String virtualPath, String resourceKey, CultureInfo culture) +56
APPortal.Login.PopulateLanguageList() in c:inetpubwwwrootAPPortalDefault.aspx.cs:83
APPortal.Login.Page_Load(Object sender, EventArgs e) in c:inetpubwwwrootAPPortalDefault.aspx.cs:20
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
System.Web.UI.Control.OnLoad(EventArgs e) +132
System.Web.UI.Control.LoadRecursive() +66
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
I have a class library and was to add a resource file to it to support both English and Spanish. Any tips as how I can do this? The language will be dictated by the user visiting the site. Would like to have to only load each resource file once and cache or set in static variable and avoid any overheads.
View 2 RepliesWhat I want to do is to use the default web resource inside asp.net. For example, If I create a web page with a simple Wizard control and 4 WizardStep ( Start,Step,Finish and Complete) it create a translation of navigation button with the culture of application.
But, for example if i want to create a custom FinishNavigationTemplate I can't (or I don't know how) use the default asp.net transaltion.
How can I use the default asp.net translation (or web resource) for my custom template?
I am facing a big problem.I am using multi language support (English, Punjabi) in my asp.net web application. I pick some data from XML for display into my website. But this lead a problem (only show in one english language), so my question is :-1. How to pick data from resource file and put into XML file??like for asp.net label we pick as Meta:Resource(label1).
View 7 RepliesI have a resource "myResource" in a resource file called myResourceFile.resxWhen i try to acces the resource in code using : Resources.myResourceFile.myResourceI get the following exception:
"Resources.myResourceFile.myResource
The type 'Resources.myResourceFile' exists in both 'myResourceFile.dll' and 'App_GlobalResources.j3b95g9k.dll'
[code]...
I have a bunch of literals that try to get their info from a resource. I want the page to show Dutch automatically and english by use of a url parameter (?lang=en)
[Code]....
I keep getting a " System.InvalidOperationException: The resource class for this page was not found. Please check if the resource file exists and try again."My web.config looks like <globalization uiCulture="auto:nl" culture="auto:nl-BE"/>In Literal1 I use Resources:Voorstelling.aspx.nl-BE, bevord.Text . Is this correct?The resources are named "Voorstelling.aspx.nl-BE.resx" and "Voorstelling.aspx.en-GB.resx". There are copies of it in the root and in App_LocalResources. They are also compiled form in ../bin/site.dll, in ../bin/en-GB and in ../bin/nl-BE . Where should I save my resources?At this moment I want my page to recognize the resources without using InitializeCulture() or any fancy stuff.Is this possible?This problem has been bugging me for 2 days already. I tried iisreset /stop and /start.
I have a multilanguage application and I use resource files (.resx). I hired a person to make the translation. My question is, am I supposed to give him the resource files in order to make the translation and how he will open the resource files? Obviously, he doesn't have a copy of Visual Studio! Is there any tool that I can give him in order to work with the resource files?
View 2 Repliesi have used global resource file resource.resx
and in that i have added key Booklimit with value 10
can i change that value daynamically using dropdownlist from code page page.cs ?
i know that i can set a Label's text by using this syntax:
lblMessage.Text = (string)GetGlobalResourceObject("resxFile", "message");
but what's the difference(benefit/drawbacks) to using this syntax:
lblMessage.Text = Resources.resxFile.message;
also, i just found out that this second method doesn't work for local resource files. is there a different syntax used for local resource files?
I need my site to be multilingual. So i have added resx to each page. Now the texts been taken from resource depends on chosen culture. Now my customer want to edit some translation from administration panel. Can resources can be edited in runtime? If they are - is it the best choise to do it that way?(Its seems to me strange i didnt see something lake that in any place)?
View 2 Replies