Registriert seit: 18. Apr 2008
223 Beiträge
Delphi 7 Professional
|
[gnugettext] Wie funzt das?
4. Okt 2008, 21:57
Also ich habe da mal was erstellt, versuche das mit GnuGetText zu übersetzen:
Main.pas:
Delphi-Quellcode:
unit Main;
{$include 'config.inc'}
interface
uses
gnugettext,Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,selectlng, StdCtrls, Menus;
type
TfrmMain = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
frmMain: TfrmMain;
implementation
{$R *.dfm}
procedure TfrmMain.FormCreate(Sender: TObject);
begin
TranslateComponent(self);
ShowMessage(_(' File'));
end;
end.
AWM.dpr:
Delphi-Quellcode:
program AWM;
uses
Forms,
gnugettext in 'gnugettext.pas',
Main in 'Main.pas' {frmMain},
language in 'language.pas',
{$R *.res}
begin
UseLanguage('de');
AddDomainForResourceString ('delphi');
Application.Initialize;
Application.CreateForm(TfrmMain, frmMain);
Application.Run;
end.
locale/de/default.po:
Zitat:
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: Marius <chaos.boy@live.de>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "File"
msgstr "Datei"
Er sagt trotzdem "File".
Warum?
Marius
|
|
Zitat
|