How can I temporarily diable localization...

G

Guest

Hello,

I am trying to localize an existing application (asp.net 2.0). using
implicit as well as explicit localization.

Asp.net 2.0 uses App_LocalResources folder for implicit localization. When
this happens the tag values for Text, ToolTip etc. are not used from the aspx
file but read from the resource files. The problem is that most developers
works
on the aspx files to make and view changes.

We would like to have our developers work and test in aspx files and then we
would like to write a program to synchronize the text values from the aspx
files to the resource files (.resx files) later during the release.

Is it possible to temporarily switch off the globalization in asp.net 2.0
using some settings in web.config, or writing some C# program in
global.asax.cs. When the switch is off, I would like asp.net to work as if
there are no globalization resources (i.e. it should read text values from
aspx files and not the resource files).

Any input will be appreciated.

Thanks
 
S

Steven Cheng[MSFT]

Hello jojobar,

Welcome to the ASPNET newsgroup.

From your description, you're developing an ASP.NET 2.0 web application
which use the "Local Resource" to localize all the pages in the
application. Currently you're wondering whether we can temporarily disable
using "Local Resource" and instead use the aspx template's setting for
those pages which is configured to use "Local Resource", correct?

Based on my research, when page is configured to use "Local Resource", the
localized controls are associated to their localized resource items by the
"meta:XXX" attributes, therefore, if we want to prevent the controls from
getting property values from "Local Resource" files, we have to remove the
"meta:XXX" attributes. There is no other attributes at page level or
application level which can disable the "Local Resource" setting(if the
page or control has used the "meta:xxx" attribute).

In addition, for your scenario, would you consider put all the test control
properties in the default "Local Resource" file at development time? Since
we can control the page or application to use a fixed culture/uiculture
setting, by put the test control property values in a certain culture's
"Local Resource" file, the pages can always read property settings from
that specific file.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
G

Guest

Thank you for your reply. I kindof figured this out after doing some
research. It would be nice to be able to do this though!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top