You are here

function _hosting_language_name in Hosting 7.4

Same name and namespace in other branches
  1. 5 package/hosting_package.module \_hosting_language_name()
  2. 6.2 package/hosting_package.module \_hosting_language_name()
  3. 7.3 package/hosting_package.module \_hosting_language_name()

Lookup a language name based on the iso language code.

5 calls to _hosting_language_name()
hosting_get_profile_languages in package/hosting_package.module
@todo document this function
hosting_site_handler_field_language::render in site/includes/views/handlers/hosting_site_handler_field_language.inc
Render the field.
hosting_site_view in site/hosting_site.nodeapi.inc
Implements hook_view().
_hosting_language_names in package/hosting_package.module
Return names of the languages available
_hosting_package_instances_load_languages in package/hosting_package.instance.inc
Get the languages associated with an instance of a package.
1 string reference to '_hosting_language_name'
hosting_site_form in site/hosting_site.form.inc
Implements hook_form().

File

package/hosting_package.module, line 379
Defines package node types

Code

function _hosting_language_name($language) {
  $name = $language;
  include_once DRUPAL_ROOT . '/includes/iso.inc';
  $locales = _locale_get_predefined_list();
  if (isset($locales[$language])) {
    $name = $locales[$language][0];
    if (isset($locales[$language][1])) {
      $name .= ' ' . t('(@language)', array(
        '@language' => $locales[$language][1],
      ));
    }
  }
  return $name;
}