Click here to Skip to main content
11,796,774 members (66,991 online)
Rate this: bad
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 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.

<h2 class="title">

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.

Posted 30-Oct-11 10:47am
Rate this: bad
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">
and you can use the info from this post:[^]
to localize the text.

Best regards
Espen Harlinn
SAKryukov at 31-Oct-11 0:19am
A 5.
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.
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.

Mario Majcica at 6-Jan-12 10:10am
<asp:Localize> element works nicely.

Espen Harlinn at 6-Jan-12 10:11am
Nice that it worked out :)
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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.
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.
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)

  Print Answers RSS
0 Maciej Los 480
1 Abhinav S 369
2 OriginalGriff 360
3 CPallini 285
4 KrunalRohit 249
0 OriginalGriff 2,032
1 Maciej Los 1,725
2 KrunalRohit 1,310
3 CPallini 1,055
4 ppolymorphe 883

Advertise | Privacy | Mobile
Web04 | 2.8.151002.1 | Last Updated 31 Oct 2011
Copyright © CodeProject, 1999-2015
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