Getting list of site languages via ROQL

Tags: 

Quick Query tip. If you need to get a list of the supported languages on a site, try the following query:

Select Language.ID, Language.LookupName From SiteInterface GROUP BY Language.LookupName;

The query will provide the ISO Local/Language codes applicable to your site. Unfortunately, it does not give you the localized labels for these languages.

Example of results from the query

ID LookupName
1 en_US
2 en_GB
3 ja_JP
4 ru_RU

Categories : 

Zircon - This is a contributing Drupal Theme
Design by WeebPal.