Recent

Author Topic: System language  (Read 1027 times)

vladimirr

  • New member
  • *
  • Posts: 12
System language
« on: February 28, 2019, 09:43:08 am »
Hi! How to get default system language?


Thaddy

  • Hero Member
  • *****
  • Posts: 8045
Re: System language
« Reply #1 on: February 28, 2019, 10:05:30 am »
formatsettings
Hamlet 1.4 (nothing wrong with the Danish, btw)

wp

  • Hero Member
  • *****
  • Posts: 5737
Re: System language
« Reply #2 on: February 28, 2019, 10:31:47 am »
Call either GetLanguageIDs(var Lang, FallbackLang: string) (in unit GetText) or LazGetLanguageIDs(var Lang, FallbackLang: string) (in unit LazUTF8); the latter is an extension of the first one to work also in Darwin.
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

vladimirr

  • New member
  • *
  • Posts: 12
Re: System language
« Reply #3 on: March 05, 2019, 12:04:02 pm »
Call either GetLanguageIDs(var Lang, FallbackLang: string) (in unit GetText) or LazGetLanguageIDs(var Lang, FallbackLang: string) (in unit LazUTF8); the latter is an extension of the first one to work also in Darwin.

Thank you! I've found one more - LazGetShortLanguageID() // returns "en", "ru"..