function _domain_locale_get_domains_languages in Domain Locale 7
Same name and namespace in other branches
- 6 domain_locale.module \_domain_locale_get_domains_languages()
Helper function to retrieve enabled languages for each domain
Return value
Array language list indexed by domain_id
1 call to _domain_locale_get_domains_languages()
- domain_locale_list in ./
domain_locale.module - Retrieves an array of domains and languages enabled on those domains.
File
- ./
domain_locale.module, line 542 - Provides domain specific language settings.
Code
function _domain_locale_get_domains_languages() {
$result = db_query("SELECT domain_id, language, weight FROM {domain_locale} ORDER BY domain_id, weight, language ASC");
$domains = array();
foreach ($result as $row) {
$domains[$row->domain_id][$row->language] = array(
'weight' => $row->weight,
);
}
return $domains;
}