Top of your web page class (code behind)

 

           ResourceManager LocRM;

 

           #region Events

           protected void Page_Load(object sender, EventArgs e)

           {

                

                //Set which language resource file is needed

                Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture(Request.UserLanguages[0]);

                Thread.CurrentThread.CurrentUICulture = new
CultureInfo(Request.UserLanguages[0]);

                LocRM = new
ResourceManager("Your.NameSpace_LocalResources.YourLanguageFileHere",
typeof(ClassName).Assembly);

 

 

YourLangaugeFileHere.resx is just a simple editor to take your object names
and associate the .Text replacements is it supposed to do for THIS language.

 


AcceptChangesLinkBttn

Accept Ship Changes


BarcodeScan_Label

Barcode Scan


CloseLinkBttn

Close Recipient

 

 You will need to do this for all pages.  

 

.........................

Stephen Russell - 

Senior Visual Studio Developer, DBA

 

Memphis, TN

901.246-0159

 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Ramon Lopes
Sent: Friday, April 03, 2009 1:45 PM
To: [email protected]
Subject: [DotNetDevelopment] Re: Asp.net internationalization

 

Hi Stephen,

 

I am thankful for your attention.

 

The issue is just that I haven't been being successful trying to use the
template in asp.net page, for example the code snippet below described in
the website doesn't work:

 

App_GlobalResources.Resources.Welcome;

 

I would like to know how to access the text in the internationalization
template.

 

Sorry for some english mistakes, besides I hope my words don't sound
agressive.

 

Thanks!

 

 

On Fri, Apr 3, 2009 at 3:09 PM, Stephen Russell <[email protected]>
wrote:

It is pretty straight forward.  You make a standard language template for
your site and add others in a translated fashion as needed.  The page will
catch the local language of the client and pull the "best" fit for use.

 

The text is held in xml so it renders fine.  You just have to take the TIME
to expand your page to the bas language.  After that you bring in someone to
translate to other languages as needed.

 

.........................

Stephen Russell - 

Senior Visual Studio Developer, DBA

 

Memphis, TN

901.246-0159

 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Ramon Lopes
Sent: Friday, April 03, 2009 7:58 AM
To: [email protected]
Subject: [DotNetDevelopment] Asp.net internationalization

 

hello everybody,

does anyone have any idea how to use internationalization in asp.net
<http://asp.net/> ?
I read about that in this link: http://weblogs.manas.com.ar/smedina/?p=6 but
it didn't worke very well.

To be hones, I didn't appreciate the act of changint the access modifier:
'We just need to change the access modifier of the default resource file
from internal to public"

Thanks in advance!
-- 
Ramon Pereira Lopes

No virus found in this incoming message.
Checked by AVG - www.avg.com <http://www.avg.com/> 
Version: 8.0.238 / Virus Database: 270.11.40/2039 - Release Date: 04/03/09
06:19:00




-- 
Ramon Pereira Lopes

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.238 / Virus Database: 270.11.41/2040 - Release Date: 04/03/09
17:54:00

Reply via email to