You are here

function hidden_language_permission in Hidden Language 7

Implements hook_permission().

File

./hidden_language.module, line 26

Code

function hidden_language_permission() {
  $languages = language_list('enabled');
  $permissions = array();
  foreach ($languages[1] as $language) {
    $permissions["access hidden language {$language->language}"] = array(
      'title' => t('Access hidden language @language', array(
        '@language' => $language->name,
      )),
    );
  }
  $permissions['access all hidden languages'] = array(
    'title' => t('Access all hidden languages'),
  );
  return $permissions;
}