Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Get language ISO-639 from Locale::Language

Get language ISO-639 from Locale::Language

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AlaaM
    wrote on last edited by AlaaM
    #1

    Can I get the language code (iso-639) as a string given a Locale::Language ?

    Will this way always work:

    QLocale::Language language = settings.getUiLanguage();
    QLocale myLocale(language);
    QString str = myLocale.name();
    str = str.mid(0,str.indexOf('_'));
    
    RatzzR 1 Reply Last reply
    0
    • A AlaaM

      Can I get the language code (iso-639) as a string given a Locale::Language ?

      Will this way always work:

      QLocale::Language language = settings.getUiLanguage();
      QLocale myLocale(language);
      QString str = myLocale.name();
      str = str.mid(0,str.indexOf('_'));
      
      RatzzR Offline
      RatzzR Offline
      Ratzz
      wrote on last edited by
      #2

      @AlaaM
      You check here for details .

      --Alles ist gut.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved