Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET localization
Hi all,
 
it's been a while since I for the last time "played" with asp.net. I have one simple question about the localization.
 
I have a couple of pages containing some text in the page itself, properly formatted with different HTML tags.
 
Example:
<h2 class="title">
            MITA – ANTI SKID DEVICE FOR TYRES</h2>
 
Now, once I try to generate my local resources for that page, I do not get the strings inside the resx file and I suppose because they are not server side controls.
 
Is there any trick or is there a good practice in order to localize the text that is not part of server side controls?
 
Thanks for any suggestion.
 
Cheers!
Posted 30-Oct-11 11:47am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I haven't tried this for localization, but you will get a server side element
<h2 id="headingMita" class="title" runat="server">
 MITA – ANTI SKID DEVICE FOR TYRES
</h2>
and you can use the info from this post:
http://stackoverflow.com/questions/7505480/techniques-for-localizing-in-asp-net[^]
to localize the text.
 
Best regards
Espen Harlinn
  Permalink  
v2
Comments
SAKryukov at 31-Oct-11 0:19am
   
A 5.
--SA
Espen Harlinn at 31-Oct-11 5:09am
   
Thank you, Sergey!
SAKryukov at 31-Oct-11 0:20am
   
...but I would better advise to start from the article I referenced in my solution, please see.
--SA
Mario Majcica at 31-Oct-11 15:52pm
   
I've tried, how ever with no result. I saw also the link you posted and I will now try with <asp:Localize> element, that is new to me.
 
Thanks
Mario Majcica at 6-Jan-12 10:10am
   
<asp:Localize> element works nicely.
 
Thanks
Espen Harlinn at 6-Jan-12 10:11am
   
Nice that it worked out :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Comments
Espen Harlinn at 31-Oct-11 5:09am
   
One should usually read this first :)
SAKryukov at 31-Oct-11 11:49am
   
Yes, I recommend to go by the introduction first.
Thank you, Espen.
--SA
Mario Majcica at 31-Oct-11 15:51pm
   
Well I did read them before. I was asking about your experience and the best practices. I am not a newbie that posted about the first thing he got stuck on.
SAKryukov at 31-Oct-11 16:04pm
   
How do I know that? You are not a decent developer either, otherwise you would not down-vote an answer based on such complaint; and nothing in your question shows experience.
--SA
Mario Majcica at 31-Oct-11 16:08pm
   
Well I made a clear question, your answer was a 5 second copy and paste of first googled link, does it deserve more than a down vote? And who are you to judge me a indecent developer?
Mario Majcica at 31-Oct-11 16:19pm
   
Hah down voting the question, a big example of decency! Obviously you are suffering the points complex.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 31 Oct 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100