/ Forside / Teknologi / Udvikling / Delphi/Pascal / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
Delphi/Pascal
#NavnPoint
oldwiking 603
jrossing 525
rpje 520
EXTERMINA.. 500
gandalf 460
gubi 270
DJ_Puden 250
PARKENSS 230
technet 210
10  jdjespers.. 200
GNU gettext for Delphi
Fra : Carsten


Dato : 13-07-05 15:18

Hej

Jeg har eksperimenteret lidt med GNU gettext for Delphi og er løbet ind
i det problem at jeg ikke kan få GNU gettext til at hente teksterne ved
"Run time" fejl. Knap 2 virker fint men knap 1 (som giver en "Run time"
fejl) henter ikke den danske tekst. Er der nogen som kender GNU gettext
der kan se hvad jeg har gjort forkert. Program og log følger.

Mvh Carsten
____________________________________________________________

program pSprog;

uses

{$IFDEF GNU_GET_TEXT}
gnugettext in '..\Lib\gnugettext.pas',
gnugettextD5 in '..\Lib\gnugettextD5.pas',
{$ENDIF}

Forms,
graphics,
uSprog in 'uSprog.pas' {Form1};

{$R *.RES}

begin
{$IFDEF GNU_GET_TEXT}
AddDomainForResourceString('delphi');
UseLanguage ('da');
DefaultInstance.DebugLogToFile('LOG.TXT',false);
TP_GlobalIgnoreClass(TFont);
{$ENDIF}
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

___________________________________________________________________

unit uSprog;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
{$IFDEF GNU_GET_TEXT}
gnugettextD5,
{$ENDIF}
StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}

var
i:integer;

procedure TForm1.Button1Click(Sender: TObject);
begin
i:=i div i;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
Button2.Caption:=_('Division by zero');
end;

end.

____________________________________________________________

Debug log started 13-07-2005 16:00:14

UseLanguage(''); called
LANG env variable is ''.
Found Windows language code to be 'da_DK'.
Language code that will be set is 'da_DK'.
Plural form for the language was not found. English plurality system
assumed.

Text domain "default" is now located at
"C:\PROJEKT\DELPHI.500\SPROGTST\locale\"
Changed text domain to "default"
Globally, the NAME property of class TComponent is being ignored.
Globally, the PROPNAME property of class TCollection is being ignored.
Extra domain for resourcestring: delphi
UseLanguage('da'); called
Plural form for the language was not found. English plurality system
assumed.

Globally, class TFont is being ignored.
Reading .mo data from file
'C:\PROJEKT\DELPHI.500\SPROGTST\locale\da\LC_MESSAGES\default.mo'
Found in .mo (default): ""->"Project-Id-Version: Delphi 5 RTL
POT-Creation-Date: 2003-03-04 15:18
PO-Revision-Date: 2003-03-04 16:07+0100
Last-Translator: Lars B. Dybdahl <lars@dybdahl.dk>
Language-Team: Dansk <da@li.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
"
GetTranslationProperty(CONTENT-TYPE: ) returns 'text/plain; charset=UTF-8'.
Found in .mo (default): "Division by zero"->"Division med nul"

 
 
Søg
Reklame
Statistik
Spørgsmål : 177558
Tips : 31968
Nyheder : 719565
Indlæg : 6408914
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste