Click here to Skip to main content
15,880,543 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
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:
XML
<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

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
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 31-Oct-11 0:19am    
A 5.
--SA
Espen Harlinn 31-Oct-11 5:09am    
Thank you, Sergey!
Sergey Alexandrovich Kryukov 31-Oct-11 0:20am    
...but I would better advise to start from the article I referenced in my solution, please see.
--SA
Mario Majčica 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 Majčica 6-Jan-12 10:10am    
<asp:Localize> element works nicely.

Thanks
 
Share this answer
 
Comments
Espen Harlinn 31-Oct-11 5:09am    
One should usually read this first :)
Sergey Alexandrovich Kryukov 31-Oct-11 11:49am    
Yes, I recommend to go by the introduction first.
Thank you, Espen.
--SA
Mario Majčica 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.
Sergey Alexandrovich Kryukov 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 Majčica 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?

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900