If i set english words in DayNames, then it work (pic2), but visible only one first char (i set 'mo', visible 'm'). It`s normaly?
NxDatePicker is not support cyrillic word in DayNames
#1
Posted 11 October 2010 - 09:20 PM
If i set english words in DayNames, then it work (pic2), but visible only one first char (i set 'mo', visible 'm'). It`s normaly?
#2
Posted 11 October 2010 - 09:27 PM
Can you please create one form and place this datepicker (with Russian chars) on it and post it here.
I don't have much experience with different charsets and this may help.
Thank you.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#3
Posted 11 October 2010 - 09:28 PM
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#4
Posted 11 October 2010 - 09:34 PM
Can you please create one form and place this datepicker (with Russian chars) on it and post it here.
I don't have much experience with different charsets and this may help.
Thank you.
Best regards
in attachment - project (in zip)
Attached Files
#5
Posted 11 October 2010 - 09:54 PM
For some reason I don't get month name in Russian, and all day names are in ? chars. Do I need to do something more?
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#6
Posted 11 October 2010 - 09:59 PM
For some reason I don't get month name in Russian, and all day names are in ? chars. Do I need to do something more?
Best regards
ok. Problem in charset for DayNames. All time it set as Latin, and not can change (((
#7
Posted 11 October 2010 - 10:07 PM
Please try to update next line in NxEdit.pas
var
y, m, d: Word;
begin
inherited;
with FPopupControl as TNxDatePopup do
begin
Font.Assign(Self.Font); // <----------- new line
NoneButton.Text := FNoneCaption;
if AsDateTime = 0 then SelectedDate := Today { don't show 1899 year }
else SelectedDate := GetAsDateTime;
DecodeDate(SelectedDate, y, m, d);
DayNames := Self.FDayNames;
Year := y;
Month := m;
Day := d;
StartDay := FStartDay;
TodayButton.Text := FTodayCaption;
Height := 163;
Width := 151;
MonthNames := Self.MonthNames;
NoneButton.Visible := ShowNoneButton;
if NoneButton.Visible then TodayButton.Left := 20
else TodayButton.Left := ClientWidth div 2 - TodayButton.Width div 2;
end;
end;
I am not sure that this will help, but you may try.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#8
Posted 12 October 2010 - 01:36 AM
Please try to update next line in NxEdit.pas
var
y, m, d: Word;
begin
inherited;
with FPopupControl as TNxDatePopup do
begin
Font.Assign(Self.Font); // <----------- new line
NoneButton.Text := FNoneCaption;
if AsDateTime = 0 then SelectedDate := Today { don't show 1899 year }
else SelectedDate := GetAsDateTime;
DecodeDate(SelectedDate, y, m, d);
DayNames := Self.FDayNames;
Year := y;
Month := m;
Day := d;
StartDay := FStartDay;
TodayButton.Text := FTodayCaption;
Height := 163;
Width := 151;
MonthNames := Self.MonthNames;
NoneButton.Visible := ShowNoneButton;
if NoneButton.Visible then TodayButton.Left := 20
else TodayButton.Left := ClientWidth div 2 - TodayButton.Width div 2;
end;
end;
I am not sure that this will help, but you may try.
Best regards
absolutely no changes ((((
that interest:
we need - change charset to RUSSIAN_CHARSET in location (see pic1). But we have a problem: Charset changes for all NxDatePicker without location, marked red line (pic2). I tested change charset to all variants, and charset change for marked red line at "SYMBOL_CHARSET". All another charsets not influence to visual marked. And, marked green line may be change font color, whereas all another NxDatePicker not will change any font.
Attached Files
#9
Posted 12 October 2010 - 01:39 AM
It is interesting that October is well written in Cyrillic.
I am a little bit out of ideas. I will try tomorrow again.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#10
Posted 13 October 2010 - 01:06 AM
It is interesting that October is well written in Cyrillic.
I am a little bit out of ideas. I will try tomorrow again.
Best regards
i think, what NxDatePicker useless for me (((
return to DateTimePicker - it work fine
#11
Posted 13 October 2010 - 10:07 AM
#12
Posted 13 October 2010 - 11:47 PM
I don't know why Font settings are not translated to popup control of NxDatePicker (?!).
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#13
Posted 17 October 2010 - 09:33 PM
I don't know why Font settings are not translated to popup control of NxDatePicker (?!).
Best regards
Hello!
May be write about this problem to developers? It should help.
#14
Posted 17 October 2010 - 09:54 PM
Sure, why not.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#15
Posted 31 August 2012 - 10:28 PM
This problem in WideChar (delphi 7). Need use only AnsiChar (char) in interface program.
In NxPopupControl.pas need change this function:
TNxDatePopup = class(TNxPopupControl) ... function GetDayInWeekChar(DayInWeek: Integer): Char; // dmajkic Char -> WideChar ... implementation function TNxDatePopup.GetDayInWeekChar(DayInWeek: Integer): Char; begin Result := ' '; if Assigned(FDayNames) and InRange(DayInWeek, 1, 7) and (FDayNames.Count >= 7) then Result := Char(FDayNames[DayInWeek - 1][1]) else case GetActualStartDay of dwSunday: Result := Char(LongDayNames[DayInWeek][1]); dwMonday: if DayInWeek = 7 then Result := Char(LongDayNames[1][1]) else Result := Char(LongDayNames[DayInWeek + 1][1]); end; { is old version if Assigned(FDayNames) and InRange(DayInWeek, 1, 7) and (FDayNames.Count >= 7) then Result := WideChar(FDayNames[DayInWeek - 1][1]) else case GetActualStartDay of dwSunday: Result := WideChar(LongDayNames[DayInWeek][1]); dwMonday: if DayInWeek = 7 then Result := WideChar(LongDayNames[1][1]) else Result := WideChar(LongDayNames[DayInWeek + 1][1]); end;} end;
These changes solved my problem.
#16
Posted 01 September 2012 - 07:13 PM
I need to review this change. It may take some time.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#17
Posted 03 September 2012 - 09:59 PM
It actually only for Delphi7. Delphi7 have some problems in multilanguage interface.
I'm currently using a string, not a char.
............ function GetDayInWeekChar(DayInWeek: Integer): string; ........... implementation function TNxDatePopup.GetDayInWeekChar(DayInWeek: Integer): string; begin Result := ' '; if Assigned(FDayNames) and InRange(DayInWeek, 1, 7) and (FDayNames.Count >= 7) then Result := copy(FDayNames[DayInWeek - 1],1,2) else case GetActualStartDay of dwSunday: Result := copy(LongDayNames[DayInWeek],1,2); dwMonday: if DayInWeek = 7 then Result := copy(LongDayNames[1],1,2) else Result := copy(LongDayNames[DayInWeek + 1],1,2); end; end;
It was forced, as one symbol in Cyrillic can be difficult as the day of the week (п в с ч п с в).
Common to use 2 symbols (пн вт ср чт пт сб вс).
pic1.png 8.85KB 1 downloads
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users