472,958 Members | 2,563 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

Problem with language. Thank You.

Hello,

i have a Calendar Control in my web site and when it's in my computer the
months and weekdays are in portuguese.
When i change it to my server the months and weekdays change to english.

Do you think i can solve this by changing culture in my web.config file?

If yes, can you tell me what should be the code to include in the web.config
file to force my culture to portuguese?

If no, can you tell me what should be the solution?

Thank You,
Miguel
Nov 18 '05 #1
3 1127
Hello Miguel,

One solution would be to put your culture information in the web.config like
this:

<configuration>
<appSettings>
<add key="CI" value="pt-PT" />
</appSettings>

<system.web>
.....

Then, you could retrieve the value in a variable and use the CultureInfo
class to set the language of the calendar:
Public strCI As String
Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
strCI = ConfigurationSettings.AppSettings("CI")
If Not IsPostBack Then
Dim dtNow As Date = DateTime.Now
Dim strName As String = Session("strLanguage")
Thread.CurrentThread.CurrentUICulture = _
New CultureInfo(strCI, False)
Thread.CurrentThread.CurrentCulture = _
New CultureInfo(strCI)
Calendar1.SelectedDate = dtNow
Calendar1.VisibleDate = dtNow
End If
End Sub
Private Sub Calendar1_SelectionChanged _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Calendar1.SelectionChanged
Thread.CurrentThread.CurrentUICulture = _
New CultureInfo(strCI, False)
Thread.CurrentThread.CurrentCulture = _
New CultureInfo(strCI)
End Sub
Does this help?

Ken
Microsoft MVP [ASP.NET]
Toronto

"Miguel Dias Moura" <in************@27lamps.com> wrote in message
news:u$**************@TK2MSFTNGP11.phx.gbl...
Hello,

i have a Calendar Control in my web site and when it's in my computer the
months and weekdays are in portuguese.
When i change it to my server the months and weekdays change to english.

Do you think i can solve this by changing culture in my web.config file?

If yes, can you tell me what should be the code to include in the
web.config
file to force my culture to portuguese?

If no, can you tell me what should be the solution?

Thank You,
Miguel


Nov 18 '05 #2
Hi,

i am getting some problems in making this code work. Could you please send
me an example page with a calendar control and how to use the code you
sugested me?

Please use my email in******@27lamps.com

Thank You Very Much,
Miguel

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:OP**************@TK2MSFTNGP11.phx.gbl...
Hello Miguel,

One solution would be to put your culture information in the web.config like this:

<configuration>
<appSettings>
<add key="CI" value="pt-PT" />
</appSettings>

<system.web>
....

Then, you could retrieve the value in a variable and use the CultureInfo
class to set the language of the calendar:
Public strCI As String
Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
strCI = ConfigurationSettings.AppSettings("CI")
If Not IsPostBack Then
Dim dtNow As Date = DateTime.Now
Dim strName As String = Session("strLanguage")
Thread.CurrentThread.CurrentUICulture = _
New CultureInfo(strCI, False)
Thread.CurrentThread.CurrentCulture = _
New CultureInfo(strCI)
Calendar1.SelectedDate = dtNow
Calendar1.VisibleDate = dtNow
End If
End Sub
Private Sub Calendar1_SelectionChanged _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Calendar1.SelectionChanged
Thread.CurrentThread.CurrentUICulture = _
New CultureInfo(strCI, False)
Thread.CurrentThread.CurrentCulture = _
New CultureInfo(strCI)
End Sub
Does this help?

Ken
Microsoft MVP [ASP.NET]
Toronto

"Miguel Dias Moura" <in************@27lamps.com> wrote in message
news:u$**************@TK2MSFTNGP11.phx.gbl...
Hello,

i have a Calendar Control in my web site and when it's in my computer the months and weekdays are in portuguese.
When i change it to my server the months and weekdays change to english.

Do you think i can solve this by changing culture in my web.config file?

If yes, can you tell me what should be the code to include in the
web.config
file to force my culture to portuguese?

If no, can you tell me what should be the solution?

Thank You,
Miguel

Nov 18 '05 #3
No need,

i just solved it.

Thank You Anyway,
Miguel

"Miguel Dias Moura" <in************@27lamps.com> wrote in message
news:u7**************@TK2MSFTNGP09.phx.gbl...
Hi,

i am getting some problems in making this code work. Could you please send
me an example page with a calendar control and how to use the code you
sugested me?

Please use my email in******@27lamps.com

Thank You Very Much,
Miguel

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:OP**************@TK2MSFTNGP11.phx.gbl...
Hello Miguel,

One solution would be to put your culture information in the web.config

like
this:

<configuration>
<appSettings>
<add key="CI" value="pt-PT" />
</appSettings>

<system.web>
....

Then, you could retrieve the value in a variable and use the CultureInfo
class to set the language of the calendar:
Public strCI As String
Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
strCI = ConfigurationSettings.AppSettings("CI")
If Not IsPostBack Then
Dim dtNow As Date = DateTime.Now
Dim strName As String = Session("strLanguage")
Thread.CurrentThread.CurrentUICulture = _
New CultureInfo(strCI, False)
Thread.CurrentThread.CurrentCulture = _
New CultureInfo(strCI)
Calendar1.SelectedDate = dtNow
Calendar1.VisibleDate = dtNow
End If
End Sub
Private Sub Calendar1_SelectionChanged _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Calendar1.SelectionChanged
Thread.CurrentThread.CurrentUICulture = _
New CultureInfo(strCI, False)
Thread.CurrentThread.CurrentCulture = _
New CultureInfo(strCI)
End Sub
Does this help?

Ken
Microsoft MVP [ASP.NET]
Toronto

"Miguel Dias Moura" <in************@27lamps.com> wrote in message
news:u$**************@TK2MSFTNGP11.phx.gbl...
Hello,

i have a Calendar Control in my web site and when it's in my computer the months and weekdays are in portuguese.
When i change it to my server the months and weekdays change to english.
Do you think i can solve this by changing culture in my web.config file?
If yes, can you tell me what should be the code to include in the
web.config
file to force my culture to portuguese?

If no, can you tell me what should be the solution?

Thank You,
Miguel


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Federico Bari | last post by:
Good morning all from italy, i have probably a compatibility problem with a html/javascript page. The aim of the code of the file test.htm you find here following (copy the 3 files in the...
1
by: Alex | last post by:
Hello, in my company, we have a diagnostic tool for hardware. Depending on the hardware projcet, a different project configuration is needed. The configuration file is written in XML and...
4
by: Tom Jastrzebski | last post by:
Hello everybody, Here is the problem I came across experimenting with Generics. I would like to write a class or a struct adding integer to any other, initially undefined *numeric type*. So, my...
2
by: Fahad | last post by:
I have a web forms that I insert data in database using arabic and Farsi language. The problem is when I insert a record, A record is added but I get blank fields in the columns. When I insert a...
3
by: Miguel Dias Moura | last post by:
Hello, i have a Calendar Control in my web site and when it's in my computer the months and weekdays are in portuguese. When i change it to my server the months and weekdays change to english. ...
15
by: Cesar Ronchese | last post by:
Hi, I built the sample code showing the problem with dates when viewed at different machines, different Time Zones and transported via Remoting. The zip can be downloaded here: ...
6
by: TPJ | last post by:
Help me please, because I really don't get it. I think it's some stupid mistake I make, but I just can't find it. I have been thinking about it for three days so far and I still haven't found any...
1
by: Rebecca Tsukalas | last post by:
Hello, I have a problem concerning removeChild. This is the XML structure I use with php: <xml_thing <language1 <site>bla1</site <site>bla2</site <site>bla3</site </language1
7
by: The Cool Giraffe | last post by:
I have the following: //A.h class A {}; //B.h #include "A.h" class B : A {};
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.