Sprog fra en dll
HejHvordan hiver jeg f.eks. adresse fra den danske kolonne ind i en caption på en knap?
library Language;
uses
SysUtils;
function GetLang(LangID : Byte; TextID : Integer) : PChar; stdcall;
Var
Tekst : String;
Buffer : Array[0..355] of Char;
begin
Tekst:='';
Buffer:='';
Case LangID of
1 : Begin {DANISH}
Case TextID of
1 : Tekst:=' Firmasøgning ';
2 : Tekst:='Udfyld ét eller flere felter';
3 : Tekst:='Dobbeltklik for detaljer';
4 : Tekst:='Firmanavn';
5 : Tekst:='Adresse';
6 : Tekst:='Postnr./By';
7 : Tekst:='Land';
8 : Tekst:='Tlf.';
end;{END CASE}
End;
2 : Begin {ENGLISH}
Case TextID of
1 : Tekst:=' Company Search ';
2 : Tekst:='Fill in one or more fields';
3 : Tekst:='Doubleclick for details';
4 : Tekst:='Company';
5 : Tekst:='Address';
6 : Tekst:='Postal Code/City';
7 : Tekst:='Country';
8 : Tekst:='Phone';
end;{END CASE}
End;
3 : Begin {GERMAN}
Case TextID of
1 : Tekst:=' Firmensuche ';
2 : Tekst:='Ein oder mehrere Felder ausfüllen';
3 : Tekst:='Doppeltklick für Details';
4 : Tekst:='Name';
5 : Tekst:='Anschrift';
6 : Tekst:='Ort';
7 : Tekst:='Land';
8 : Tekst:='Tel.';
end;{END CASE}
End;
4 : Begin {FRENCH}
Case TextID of
1 : Tekst:=' Recherche d´entreprises ';
2 : Tekst:='Remplissez un ou plusieurs champs';
3 : Tekst:='géminéclaquer pour détail';
4 : Tekst:='Nom';
5 : Tekst:='Adresse';
6 : Tekst:='Ville';
7 : Tekst:='Pays';
8 : Tekst:='Tél.';
end;{END CASE}
End;
5 : Begin {SPANISH}
Case TextID of
1 : Tekst:=' Buscar empresas ';
2 : Tekst:='Completar uno o más campos';
3 : Tekst:='Reduplicar apresurar pues menudencias';
4 : Tekst:='Nombre';
5 : Tekst:='Dirección';
6 : Tekst:='Ciudad';
7 : Tekst:='País';
8 : Tekst:='Tel.';
end;{END CASE}
End;
6 : Begin {ITALIAN}
Case TextID of
1 : Tekst:=' Ricerca ditte ';
2 : Tekst:='Compilare uno o più campi';
3 : Tekst:='Doppio per dettaglio';
4 : Tekst:='Nome';
5 : Tekst:='Indirizzo';
6 : Tekst:='Città';
7 : Tekst:='Nazione';
8 : Tekst:='Tel.';
end;{END CASE}
End;
end;{END CASE}
GetLang:=StrCopy(Buffer,PChar(Tekst));
end;
exports
GetLang;
begin
end.
Det er en dll fil som jeg har sprogene i.
Det jeg vil det er at jeg har en knap. Hvis jeg så vælger sprog id 1 så skal der stå adresse. Håber i forstår...
Mvh
Jesper
