当前位置: 首页>>代码示例>>PHP>>正文


PHP locales::available方法代码示例

本文整理汇总了PHP中locales::available方法的典型用法代码示例。如果您正苦于以下问题:PHP locales::available方法的具体用法?PHP locales::available怎么用?PHP locales::available使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在locales的用法示例。


在下文中一共展示了locales::available方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setup

 public function setup()
 {
     self::$installed_locales = locales::installed();
     self::$default_locale = module::get_var("gallery", "default_locale");
     locales::update_installed(array_keys(locales::available()));
     module::set_var("gallery", "default_locale", "no_NO");
 }
开发者ID:HarriLu,项目名称:gallery3,代码行数:7,代码来源:Locales_Helper_Test.php

示例2: index

 public function index($share_translations_form = null)
 {
     $v = new Admin_View("admin.html");
     $v->content = new View("admin_languages.html");
     $v->content->available_locales = locales::available();
     $v->content->installed_locales = locales::installed();
     $v->content->default_locale = module::get_var("gallery", "default_locale");
     if (empty($share_translations_form)) {
         $share_translations_form = $this->_share_translations_form();
     }
     $v->content->share_translations_form = $share_translations_form;
     $this->_outgoing_translations_count();
     print $v;
 }
开发者ID:CardinS2U,项目名称:gallery3,代码行数:14,代码来源:admin_languages.php

示例3: _languages_form

 private function _languages_form()
 {
     $all_locales = locales::available();
     $installed_locales = locales::installed();
     $form = new Forge("admin/languages/save", "", "post", array("id" => "gLanguageSettingsForm"));
     $group = $form->group("choose_language")->label(t("Language settings"));
     $group->dropdown("locale")->options($installed_locales)->selected(module::get_var("gallery", "default_locale"))->label(t("Default language"))->rules('required');
     $installation_options = array();
     foreach ($all_locales as $code => $display_name) {
         $installation_options[$code] = array($display_name, isset($installed_locales->{$code}));
     }
     $group->checklist("installed_locales")->label(t("Installed Languages"))->options($installation_options)->rules("required");
     $group->submit("save")->value(t("Save settings"));
     return $form;
 }
开发者ID:hiwilson,项目名称:gallery3,代码行数:15,代码来源:admin_languages.php


注:本文中的locales::available方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。