Get the default Language of the system  

Send By: Q3 Team
Web : http://www.q3.nu
Email: dlib@q3.nu
Date: 12/01/00

Tip accessed 419 times

 


We will get the you language ID by means of GetSystemDefaultLangID and we will transform it into string by means of VerLanguageName


 procedure TForm1.Button1Click(Sender: TObject);

   function IdiomaDelSistema:string;
   var
    IdiomaID:LangID;
    Idioma: array [0..100] of char;
   begin
     {Obtiene el ID del idioma del sistema}
     {Get System ID}
     IdiomaID:=GetSystemDefaultLangID;
     {Obtiene el nombre del idioma}
     {Get Languaje Name}
     VerLanguageName(IdiomaID,Idioma,100);
     Result:=String(Idioma);
   end;

 begin
   Label1.Caption:=IdiomaDelSistema;
 end;



To get the languaje of the current user, use GetUserDefaultLangID