Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Oct 15, 2008 12:06 AM by jemreal
0 Points
1 Post
Jun 19, 2008 07:00 PM|LINK
Many companies are working with resource files (.resx or .resource) in order to support multi-lingual Application Website. I wrote a post in my blog that decribe how to read and write from resx & resource file
Link to the post:
.Net .net 2.0 ASP.net 2.0 .net 2.0 c#
Member
4 Points
2 Posts
Sep 26, 2008 03:11 PM|LINK
Hi All,
if you have a resorce file like: EN.resx
you may write a function that pass
language = "EN"
Token = "myToken"
and return the value with:
return HttpContext.GetGlobalResourceObject(Language, Token).ToString()
8 Points
6 Posts
Oct 15, 2008 12:06 AM|LINK
Hi,
I am detecting the browser's language settings then saving it to session. the code runs like this.
private string CheckUserLocale() { HttpRequest Request = HttpContext.Current.Request; if (Request.UserLanguages == null) return "null"; string Lang = Request.UserLanguages[0]; return Lang; }
then I'm using something like this
<asp:Button ID="btnUpdate" runat="server" Height="24px" meta:resourcekey="btnUpdateResource1" Text="Update" Width="98px" OnClick="btnUpdate_Click" />
on every controls on my page.
lartzi
0 Points
1 Post
How To Work with Resources Files (Resx + resource) in C#
Jun 19, 2008 07:00 PM|LINK
Many companies are working with resource files (.resx or .resource) in order to support multi-lingual Application Website. I wrote a post in my blog that decribe how to read and write from resx & resource file
Link to the post:
http://jajahdevblog.com/lior/?p=26.Net .net 2.0 ASP.net 2.0 .net 2.0 c#
Strombolano
Member
4 Points
2 Posts
Re: How To Work with Resources Files (Resx + resource) in C#
Sep 26, 2008 03:11 PM|LINK
Hi All,
if you have a resorce file like: EN.resx
you may write a function that pass
language = "EN"
Token = "myToken"
and return the value with:
return HttpContext.GetGlobalResourceObject(Language, Token).ToString()
jemreal
Member
8 Points
6 Posts
Re: How To Work with Resources Files (Resx + resource) in C#
Oct 15, 2008 12:06 AM|LINK
Hi,
I am detecting the browser's language settings then saving it to session. the code runs like this.
private string CheckUserLocale()
{
HttpRequest Request = HttpContext.Current.Request;
if (Request.UserLanguages == null)
return "null";
string Lang = Request.UserLanguages[0];
return Lang;
}
then I'm using something like this
<asp:Button ID="btnUpdate" runat="server" Height="24px" meta:resourcekey="btnUpdateResource1" Text="Update" Width="98px" OnClick="btnUpdate_Click" />
on every controls on my page.