Get the default Language of current user  

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

Tip accessed 427 times

 


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


 procedure TForm1.Button1Click(Sender: TObject);

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

 begin
   Label1.Caption:=IdiomaDelUsuario;
 end;




To get the languaje of the system, use GetSystemDefaultLangID