Last post Apr 07, 2008 10:53 PM by william83
Mar 24, 2008 04:33 AM|william83|LINK
hi all friends ,
i just need to ask a simple question for localization. Is there any way to add in a space inside the resource.resx file ( Name column) ? like Log IN instead of LogIn.
thanks in advance
Mar 25, 2008 05:17 PM|vivek_iit|LINK
You can simply use: Log in (use for space)
Mar 26, 2008 11:31 PM|william83|LINK
hi vivek ,
thanks for your reply , but i have tried put it , but it 's cannot be work ( I using vs2005 to key in the value)
Mar 31, 2008 04:19 PM|vivek_iit|LINK
but in more (each nbsp would add a space in HTML). Logically it should work, as the same value is rendered in HTML. May be putting just one space is not visible enough.
Apr 02, 2008 10:37 PM|william83|LINK
I had tried putting several inside , but still cannot . Nevermind i just simply add in "_" intead of space . However , thanks for your help.
Besides that , I have another question. I knew you are pro on localization . Is there any way to search all the label in the form and replace it with the selected language from the library while the form load ? Is it a proper way on using asp.net localization?
thanks in advance
Apr 03, 2008 03:51 AM|Talib_dotnet|LINK
Hi william 83,
Can you explain clearly as to what you need to do...... So it would be easier to help you out.
Apr 03, 2008 05:49 AM|william83|LINK
Q1) Can we add a space in the resources.resx while the time we are key in the name & value through vs 2005 ?
Q2) Is there any way to search all the label in the asp .net web form and replace it with the selected language from the resources library while the form load ? Is it a proper way on using asp.net localization?
Apr 03, 2008 05:50 AM|william83|LINK
sorry for accidentally submitted mutiple duplicate post . Actually I would like to develop a asp.net web that support malay & english language.
Apr 03, 2008 06:24 AM|Talib_dotnet|LINK
Yes .... we can add a space in Resources file by using   and i hv seen that it works when the text which is being displayed is on a Linkbutton ( 'Coz i had used linkbuttons on my page in the header
and wanted to put some space between each link , so i tried with
and it worked. ) So what i want to know is on "On What control , do you want to display the text present in the Resource file."
Apr 03, 2008 03:03 PM|vivek_iit|LINK
Is there any way to search all the label in the form and replace it with the selected language from the library while the form load ? Is it a proper way on using asp.net localization? or ??
If you want to do a manual search, then you can parse all the controls inside the form using foreach loop and assign strings manually, like:
foreach (Control c in this.controls)
if (typeof(c) is Label) //then do stuff...
Another way would be to use the SAME resource key for all the controls who have the same localized text. This would be good ONLY if you want to use the same text for all the lables.
Apr 03, 2008 09:38 PM|william83|LINK
I had tried key in the   through vs2005 like Apply Online ( Name) column , but vs2005 return the error msg "The resource name Apply Online is not a valid identifier."
Apr 03, 2008 09:51 PM|william83|LINK
thanks for the explanation, but how can I search the resource from the resources file if using the sample code you given?
if (typeof(c) is Label) //
thanks In advance.
Apr 05, 2008 02:46 AM|vivek_iit|LINK
if (typeof(c) is Label)
//get the ID of the label control, controlID, and based on this ID, treating it as a key
//search res from rex file here and apply to label
the above is just sample psuedo code,not a running version of the actual code.
Apr 07, 2008 12:36 AM|william83|LINK
Thanks for you patient explanation . I'm new on localization .Can you show me a sample of actual source code on how to search the resources from resx file?
thanks In Advance..
Apr 07, 2008 10:53 PM|william83|LINK
I already post a new thread on how to search the resource from the resx resources file. Please refer this link
http://forums.asp.net/t/1244394.aspx for further discussion.