Monday, March 26, 2012
suggestions
i am currently working on a survey web site which is based on ASP.NET. Every
survey is over 100 questions and using two different languages (for example,
english and chinese), and 15 questions per page by request, also I need to s
tore
answers to database.
Here is my question, is there any way I can pull the "save to Database
function/module" out and save it to a standalone function/module so both
language web pages can re-use it without put it on every single page? and ho
w?
Thanks in advance.I'm not sure I understand your question. If your database is properly
designed and your application is well architectured, from the little I do
understand, you should be able to re-use the save functionality.
How are you doing it now and what problems are you running into?
karl
MY ASP.Net tutorials
http://www.openmymind.net/
"Jason" <jason@.hotmail.com> wrote in message
news:t1buj01kue9g1d077hif2md9rc8m24murr@.
4ax.com...
> Hi, all:
> i am currently working on a survey web site which is based on ASP.NET.
Every
> survey is over 100 questions and using two different languages (for
example,
> english and chinese), and 15 questions per page by request, also I need to
store
> answers to database.
> Here is my question, is there any way I can pull the "save to Database
> function/module" out and save it to a standalone function/module so both
> language web pages can re-use it without put it on every single page? and
how?
> Thanks in advance.
Here is what I did so far:
Survey1-EN.aspx
Survey1-EN.aspx.cs
Survey2-EN.aspx
Survey2-EN.aspx.cs
Survey1-CN.aspx
Survey1-CN.aspx.cs
Survey2-CN.aspx
Survey2-CN.aspx.cs
the only difference between Survey1-EN.aspx and Survey1-CN.aspx is user will
see
different language(English or Chinese) in each page. And I have a class call
ed
saveToDB() in each *.aspx.cs, so how can I let each *.aspx.cs call the
standalone procedure so I do not need to have the saveToDB() in each *.aspx.
cs?
Thanks.
ASP.NET newbie!
On Wed, 8 Sep 2004 13:37:09 -0400, "Karl" <karl REMOVE @. REMOVE openmymind
REMOVEMETOO . ANDME net> wrote:
>I'm not sure I understand your question. If your database is properly
>designed and your application is well architectured, from the little I do
>understand, you should be able to re-use the save functionality.
>How are you doing it now and what problems are you running into?
>karl
I've written a two part tutorial on this sort of thing:
http://openmymind.net/localization/index.html
http://openmymind.net/localization/index2.html
You should find it useful. It'll help you onl have 1 page for X languages
and give you some database design ideas.
Karl
MY ASP.Net tutorials
http://www.openmymind.net/
"J" <j@.NoSpam.org> wrote in message
news:9ghuj0ltoq4olrsd965ahsb08noq40kr4s@.
4ax.com...
> Here is what I did so far:
> Survey1-EN.aspx
> Survey1-EN.aspx.cs
> Survey2-EN.aspx
> Survey2-EN.aspx.cs
> Survey1-CN.aspx
> Survey1-CN.aspx.cs
> Survey2-CN.aspx
> Survey2-CN.aspx.cs
> the only difference between Survey1-EN.aspx and Survey1-CN.aspx is user
will see
> different language(English or Chinese) in each page. And I have a class
called
> saveToDB() in each *.aspx.cs, so how can I let each *.aspx.cs call the
> standalone procedure so I do not need to have the saveToDB() in each
*.aspx.cs?
> Thanks.
> ASP.NET newbie!
>
> On Wed, 8 Sep 2004 13:37:09 -0400, "Karl" <karl REMOVE @. REMOVE openmymind
> REMOVEMETOO . ANDME net> wrote:
>
>
suggestions
i am currently working on a survey web site which is based on ASP.NET. Every
survey is over 100 questions and using two different languages (for example,
english and chinese), and 15 questions per page by request, also I need to store
answers to database.
Here is my question, is there any way I can pull the "save to Database
function/module" out and save it to a standalone function/module so both
language web pages can re-use it without put it on every single page? and how?
Thanks in advance.I'm not sure I understand your question. If your database is properly
designed and your application is well architectured, from the little I do
understand, you should be able to re-use the save functionality.
How are you doing it now and what problems are you running into?
karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Jason" <jason@.hotmail.com> wrote in message
news:t1buj01kue9g1d077hif2md9rc8m24murr@.4ax.com...
> Hi, all:
> i am currently working on a survey web site which is based on ASP.NET.
Every
> survey is over 100 questions and using two different languages (for
example,
> english and chinese), and 15 questions per page by request, also I need to
store
> answers to database.
> Here is my question, is there any way I can pull the "save to Database
> function/module" out and save it to a standalone function/module so both
> language web pages can re-use it without put it on every single page? and
how?
> Thanks in advance.
Here is what I did so far:
Survey1-EN.aspx
Survey1-EN.aspx.cs
Survey2-EN.aspx
Survey2-EN.aspx.cs
Survey1-CN.aspx
Survey1-CN.aspx.cs
Survey2-CN.aspx
Survey2-CN.aspx.cs
the only difference between Survey1-EN.aspx and Survey1-CN.aspx is user will see
different language(English or Chinese) in each page. And I have a class called
saveToDB() in each *.aspx.cs, so how can I let each *.aspx.cs call the
standalone procedure so I do not need to have the saveToDB() in each *.aspx.cs?
Thanks.
ASP.NET newbie!
On Wed, 8 Sep 2004 13:37:09 -0400, "Karl" <karl REMOVE @. REMOVE openmymind
REMOVEMETOO . ANDME net> wrote:
>I'm not sure I understand your question. If your database is properly
>designed and your application is well architectured, from the little I do
>understand, you should be able to re-use the save functionality.
>How are you doing it now and what problems are you running into?
>karl
I've written a two part tutorial on this sort of thing:
http://openmymind.net/localization/index.html
http://openmymind.net/localization/index2.html
You should find it useful. It'll help you onl have 1 page for X languages
and give you some database design ideas.
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"J" <j@.NoSpam.org> wrote in message
news:9ghuj0ltoq4olrsd965ahsb08noq40kr4s@.4ax.com...
> Here is what I did so far:
> Survey1-EN.aspx
> Survey1-EN.aspx.cs
> Survey2-EN.aspx
> Survey2-EN.aspx.cs
> Survey1-CN.aspx
> Survey1-CN.aspx.cs
> Survey2-CN.aspx
> Survey2-CN.aspx.cs
> the only difference between Survey1-EN.aspx and Survey1-CN.aspx is user
will see
> different language(English or Chinese) in each page. And I have a class
called
> saveToDB() in each *.aspx.cs, so how can I let each *.aspx.cs call the
> standalone procedure so I do not need to have the saveToDB() in each
*.aspx.cs?
> Thanks.
> ASP.NET newbie!
>
> On Wed, 8 Sep 2004 13:37:09 -0400, "Karl" <karl REMOVE @. REMOVE openmymind
> REMOVEMETOO . ANDME net> wrote:
> >I'm not sure I understand your question. If your database is properly
> >designed and your application is well architectured, from the little I do
> >understand, you should be able to re-use the save functionality.
> >How are you doing it now and what problems are you running into?
> >karl
Thursday, March 22, 2012
Supporting Languages - Welsh ?
And what would the ISO code be for it ?
I've tried using the User Defined cy as some sites say, but the following
code just uses the catch block as it's not found.
Try
Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture(Request.UserLang uages(0))
ls_language = Thread.CurrentThread.CurrentCulture.Name
Catch
Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture("en-gb")
ls_language = Thread.CurrentThread.CurrentCulture.Name
End Try
HttpContext.Current.Response.Cookies.Add(New HttpCookie("Cul", ls_language))
--
Adrian Parker
Ingenuity At Work LtdHi Adrian,
Welcome to the MSDN newsgroup.
As for the "Welsh", it is still not included in the .net framework (both
1.1 and 2.0)'s predefined cultureInfo list:
#CultureInfo Class
http://msdn2.microsoft.com/en-us/li...cultureinfo.as
px
So even if we add a custom language header(for Welsh) in the http message
through IE's languages setting, the server-side ASP.NET application can not
find the direct mapped culture for it.
BTW, currently for windows XP(>SP2), if you're using .net framework 2.0,
there is a "Welsh" culture available in the OS's regional setting. And in
the .net framework 2.0 code, we can use the "cy-GB" to create the
CultureInfo specific to that setting.'
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Hi Steven,
So if we use cy-GB as our language, it would work, but only using net2.0 on XPsp2 ?
Is this currently supported on windows 2003 ? and if not now, when will it be ?
Thanks
--
Adrian Parker
Ingenuity At Work Ltd
"Steven Cheng[MSFT]" <stcheng@.online.microsoft.com> wrote in message news:%23QOiBxPPGHA.2972@.TK2MSFTNGXA03.phx.gbl...
> Hi Adrian,
> Welcome to the MSDN newsgroup.
> As for the "Welsh", it is still not included in the .net framework (both
> 1.1 and 2.0)'s predefined cultureInfo list:
> #CultureInfo Class
> http://msdn2.microsoft.com/en-us/li...cultureinfo.as
> px
> So even if we add a custom language header(for Welsh) in the http message
> through IE's languages setting, the server-side ASP.NET application can not
> find the direct mapped culture for it.
> BTW, currently for windows XP(>SP2), if you're using .net framework 2.0,
> there is a "Welsh" culture available in the OS's regional setting. And in
> the .net framework 2.0 code, we can use the "cy-GB" to create the
> CultureInfo specific to that setting.'
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
Thanks for your response Adrian,
So far it is limited on other OS version and I haven't got any definite
info on when it'll also be upgrated to windows 2k3. However, for .net
framework 2.0, it doest provide some new features on extending the exiting
culture set regarding on the lack of some built-in or predefined culture in
framework or on windows OS.
#Extend Your Code's Global Reach With New Features In The .NET Framework 2.0
http://msdn.microsoft.com/msdnmag/i...on/default.aspx
Though it is still quite limited, we can use it to do handle some
additional conditions in .net 2.0 applications.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Supporting Languages - Welsh ?
And what would the ISO code be for it ?
I've tried using the User Defined cy as some sites say, but the following
code just uses the catch block as it's not found.
Try
Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture(Request.UserLanguages(0))
ls_language = Thread.CurrentThread.CurrentCulture.Name
Catch
Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture("en-gb")
ls_language = Thread.CurrentThread.CurrentCulture.Name
End Try
HttpContext.Current.Response.Cookies.Add(New HttpCookie("Cul", ls_language))
Adrian Parker
Ingenuity At Work LtdHi Adrian,
Welcome to the MSDN newsgroup.
As for the "Welsh", it is still not included in the .net framework (both
1.1 and 2.0)'s predefined cultureInfo list:
#CultureInfo Class
http://msdn2.microsoft.com/en-us/li...cultureinfo.as
px
So even if we add a custom language header(for Welsh) in the http message
through IE's languages setting, the server-side ASP.NET application can not
find the direct mapped culture for it.
BTW, currently for windows XP(>SP2), if you're using .net framework 2.0,
there is a "Welsh" culture available in the OS's regional setting. And in
the .net framework 2.0 code, we can use the "cy-GB" to create the
CultureInfo specific to that setting.'
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Hi Steven,
So if we use cy-GB as our language, it would work, but only using net2.0 on
XPsp2 ?
Is this currently supported on windows 2003 ? and if not now, when will it b
e ?
Thanks
--
Adrian Parker
Ingenuity At Work Ltd
"Steven Cheng[MSFT]" <stcheng@.online.microsoft.com> wrote in message news:%23QOiBxPPGHA.2972@.TK2M
SFTNGXA03.phx.gbl...
> Hi Adrian,
> Welcome to the MSDN newsgroup.
> As for the "Welsh", it is still not included in the .net framework (both
> 1.1 and 2.0)'s predefined cultureInfo list:
> #CultureInfo Class
> [url]http://msdn2.microsoft.com/en-us/library/system.globalization.cultureinfo.as[/ur
l]
> px
> So even if we add a custom language header(for Welsh) in the http message
> through IE's languages setting, the server-side ASP.NET application can no
t
> find the direct mapped culture for it.
> BTW, currently for windows XP(>SP2), if you're using .net framework 2.0,
> there is a "Welsh" culture available in the OS's regional setting. And in
> the .net framework 2.0 code, we can use the "cy-GB" to create the
> CultureInfo specific to that setting.'
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
Thanks for your response Adrian,
So far it is limited on other OS version and I haven't got any definite
info on when it'll also be upgrated to windows 2k3. However, for .net
framework 2.0, it doest provide some new features on extending the exiting
culture set regarding on the lack of some built-in or predefined culture in
framework or on windows OS.
#Extend Your Code's Global Reach With New Features In The .NET Framework 2.0
http://msdn.microsoft.com/msdnmag/i...on/default.aspx
Though it is still quite limited, we can use it to do handle some
additional conditions in .net 2.0 applications.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)