Recent

Author Topic: System language  (Read 1118 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: 8478
Re: System language
« Reply #1 on: February 28, 2019, 10:05:30 am »
formatsettings
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.

wp

  • Hero Member
  • *****
  • Posts: 5996
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"..