Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

My web application is localized and support the different languages. Problem is that when I run my application in Spanish language then it displays extra characters with every text/string.

In English it displays :
Change page: {4} Displaying page <strong>{0}</strong> of <strong>{1}</strong>, items <strong>{2}</strong> to <strong>{3}</strong> of <strong>{5}</strong>

Whilst in Spanish it displays:
ÉS-Chañgé pagéa {4} Dísplayíñg pagé <stróñg>{0}</stróñg> óf <stróñg>{1}</stróñg>, ítéms <stróñg>{2}</stróñg> tó <stróñg>{3}</stróñg> óf <stróñg>{5}</stróñg>ÑéCHJkdÁlDJjÍyWrcmHfzüwÍWóRmSL

Please help me. why it is displaying these extra characters.

Thanks in advanced
Shweta
Posted
Updated 14-Jan-11 4:19am
v2
Comments
Sergey Alexandrovich Kryukov 14-Jan-11 9:58am    
Is it Unicode or not?
Dalek Dave 14-Jan-11 10:19am    
Edited for Readability.

My best guess is that there is someting wrong with the resx file. Open it in a text editor and investigate.

Regards
Espen Harlinn
 
Share this answer
 
v2
Comments
fjdiewornncalwe 14-Jan-11 9:58am    
Agreed... This looks like the resource is somehow coming up wrong. Perhaps a translation was done using babelfish or something of the sort, but instead of the text entries being translated, the tags were also translated.
Espen Harlinn 14-Jan-11 10:12am    
Thanks Marcus!
Member 3068951 17-Jan-11 4:06am    
I have checked my resource file. It is correct.
Espen Harlinn 17-Jan-11 9:23am    
Well, it was worth checking out - you'll have to provide more information, because basically all we can do is guess at the reason for your problem. John has proposed a quick hack to remove the symptoms.
I think the easiest thing to do would be to do this:

C#
myString = myString.Replace("strong>", "b>");


and then translate the resulting string.
 
Share this answer
 

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