You are here

function _domain_locale_get_domains_languages in Domain Locale 6

Same name and namespace in other branches
  1. 7 domain_locale.module \_domain_locale_get_domains_languages()

Helper function to retrieve enabled languages on a specific domain

Parameters

int $domain_id:

Return value

array language list

1 call to _domain_locale_get_domains_languages()
domain_locale_list in ./domain_locale.module
Retieves an array of domains and languages enabled on those domains keyed by domain IDs

File

./domain_locale.module, line 298
domain_locale Domain Locale: manage languages Provides domain specific language settings

Code

function _domain_locale_get_domains_languages() {
  $sql = db_query("SELECT domain_id, language, weight FROM {domain_locale} ORDER BY domain_id, weight, language ASC");
  $domains = array();
  while ($row = db_fetch_array($sql)) {
    $domains[$row['domain_id']][$row['language']] = array(
      'weight' => $row['weight'],
    );
  }
  return $domains;
}