Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

This is the situation:

The asp.net 2.0/VB.net app we're developing will be localized in both English and Spanish. I will use database localization.

 

My thought is to create user-controls for each set of lables on a page, then populate the lables based on the language and have the user-controls cached..

 

I think probably, it will be hard to arrange the user controls neatly on the page. Not sure. Anyone has other ideas?

 

thanks

  • Administrators
Posted

If you are using .Net 2.0 you might want to investigate the built in localisation features as this might be easier.

 

If you open a given .aspx (e.g. Default.aspx) page in the designer, go to the tools menu and select 'Generate Local Resource' - you should now find a file has been created with a .resx extension (e.g. Default.aspx.resx) in a folder named App_LocalResources. This file should contain all the localisable strings etc.

 

If you want to provide a Spanish version you will simply need to create a spanish version of the resx called Default.aspx.es.resx and provide a Spanish version for each entry in the original .resx that needs translating.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

yes, i looked into that. Then emailed Scott someone at Microsoft (he has a blog) and he forwarded my email to 3 other guys. They wrote back that in the future, RESX might not be supported and the best thing to do is to use database localization...

 

would creating user-controls, then caching them is a bad idea for labels? Is it better to keep going to the database each time we want to get the correct translation? found a sample code for database localization but not sure if i should create user-controls for labels..

Posted

hmm, no , the location is not an issue . I know I want to have the translations in the database, so I'll be using database localization I'll have a custom localizetion provider:

http://www.codeproject.com/aspnet/customsqlserverprovider.asp

 

My issue is : going to the database each time we want to display a page , hitting the database to get the correct translation for that page....

 

would that be a performance issue? that's why i'm thinking maybe i should have the labels in user-comtrols and then cache the controls...instead of hitting the database for each page , each time...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...