本文整理汇总了PHP中l10n类的典型用法代码示例。如果您正苦于以下问题:PHP l10n类的具体用法?PHP l10n怎么用?PHP l10n使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了l10n类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: Fire
public function Fire()
{
if ($this->input->do == 'submit') {
if (!filter_var($this->input->email, FILTER_VALIDATE_EMAIL)) {
EventPump::Pump()->RaiseEvent(new StandardErrorEvent(l10n::S('INVALID_EMAIL')));
return;
}
if (strlen($this->input->password) <= 4) {
EventPump::Pump()->RaiseEvent(new StandardErrorEvent(l10n::S('PASSWORD_TOO_SHORT')));
return;
}
$stmt = Bugdar::$db->Prepare("SELECT COUNT(*) AS count FROM users WHERE email = ?");
$stmt->Execute(array($this->input->email));
if ($stmt->FetchObject()->count > 0) {
EventPump::Pump()->RaiseEvent(new StandardErrorEvent(l10n::S('EMAIL_IN_USE')));
return;
}
$alias = preg_replace('/[^a-zA-Z0-9\\-_,\\. ]/', '', $this->input->alias);
$salt = phalanx\base\Random(10);
$user = new User();
$user->email = $this->input->email;
$user->alias = preg_replace('/[^a-zA-Z0-9\\-_,\\. ]/', '', $this->input->alias);
$user->password = sha1($this->input->password);
$user->usergroup_id = Usergroup::ROLE_REGISTERED;
$user->Insert();
$this->user_id = $user->user_id;
EventPump::Pump()->PostEvent(new StandardSuccessEvent('login', l10n::S('USER_REGISTER_SUCCESS')));
}
}
开发者ID:rsesek,项目名称:Bugdar2,代码行数:29,代码来源:user_register.php
示例2: Fire
public function Fire()
{
if ($this->input->do == 'submit') {
$bug = new Bug($this->input->bug_id);
try {
$bug->FetchInto();
} catch (phalanx\data\ModelException $e) {
EventPump::Pump()->RaiseEvent(new StandardErrorEvent(l10n::S('BUG_ID_NOT_FOUND')));
return;
}
$body = trim($this->input->body);
if (empty($body)) {
EventPump::Pump()->RaiseEvent(new StandardErrorEvent(l10n::S('COMMENT_MISSING_BODY')));
return;
}
$comment = new Comment();
$comment->bug_id = $bug_id;
$comment->post_user_id = Bugdar::$auth->current_user();
$comment->post_date = time();
$comment->body = $body;
$comment->Insert();
$this->comment_id = $comment->comment_id;
$search = new SearchEngine();
$search->IndexBug($bug);
EventPump::Pump()->PostEvent(new StandardSuccessEvent('view_bug/' . $bug_id, l10n::S('USER_REGISTER_SUCCESS')));
}
}
开发者ID:rsesek,项目名称:Bugdar2,代码行数:27,代码来源:comment_new.php
示例3: __construct
/**
* Constructor.
*
*/
public function __construct($okt, $sPostPrefix = 'p_')
{
$this->okt = $okt;
# POST prefix
$this->sPostPrefix = $sPostPrefix;
# locales
l10n::set(OKT_LOCALES_PATH . '/' . $this->okt->user->language . '/definitions.less.editor');
}
开发者ID:jewelhuq,项目名称:okatea,代码行数:12,代码来源:class.oktDefinitionsLessEditor.php
示例4: Fire
public function Fire()
{
$stmt = Bugdar::$db->Prepare("SELECT * FROM " . TABLE_PREFIX . "users WHERE user_id = :id OR alias = :id");
$stmt->Execute(array('id' => $this->input->_id));
if (!($this->user = $stmt->FetchObject())) {
EventPump::Pump()->RaiseEvent(new StandardErrorEvent(l10n::S('INVALID_USER')));
}
}
开发者ID:rsesek,项目名称:Bugdar2,代码行数:8,代码来源:user_view.php
示例5: prepend
protected function prepend()
{
# chargement des principales locales
l10n::set(__DIR__ . '/locales/' . $this->okt->user->language . '/main');
# permissions
$this->okt->addPerm('rte_tinymce_4_config', __('m_rte_tinymce_4_perm_config'), 'configuration');
# configuration
$this->config = $this->okt->newConfig('conf_rte_tinymce_4');
}
开发者ID:jewelhuq,项目名称:okatea,代码行数:9,代码来源:module_handler.php
示例6: _getTemplate
protected function _getTemplate()
{
$d = dirname($this->_file);
$f = basename($this->_file);
$lcPath = $d . '/locale/' . $this->_locale . '/' . $f;
l10n::loadFile($this->_locale, $lcPath);
$this->_lmsg = l10n::getTemplate($this->_locale, $this->_msg);
//echo $lcPath.' ';
}
开发者ID:alexqwert,项目名称:kanon,代码行数:9,代码来源:l10nMessage.php
示例7: __construct
public function __construct()
{
$this->registry = registry::getInstance();
$this->path = $this->registry["path"];
$this->html = html::getInstance();
$this->session = $this->registry["session"];
$this->cookie = $this->registry["cookie"];
$this->ajax = new ajax();
$this->l10n = l10n::getInstance();
}
开发者ID:ravenlp,项目名称:FlavorPHP,代码行数:10,代码来源:views.class.php
示例8: prepend_admin
protected function prepend_admin()
{
# on détermine si on est actuellement sur ce module
$this->onThisModule();
# chargement des locales admin
l10n::set(__DIR__ . '/locales/' . $this->okt->user->language . '/admin');
# on ajoutent un item au menu admin
if (!defined('OKT_DISABLE_MENU')) {
$this->okt->page->configSubMenu->add(__('m_lbl_fancybox_menu_config'), 'module.php?m=lbl_fancybox&action=config', ON_LBL_FANCYBOX_MODULE && $this->okt->page->action === 'config', 25, $this->okt->checkPerm('fancybox_config'), null);
}
}
开发者ID:jewelhuq,项目名称:okatea,代码行数:11,代码来源:module_handler.php
示例9: dc_load_locales
function dc_load_locales()
{
global $_lang, $core;
$_lang = $core->auth->getInfo('user_lang');
$_lang = preg_match('/^[a-z]{2}(-[a-z]{2})?$/', $_lang) ? $_lang : 'en';
if (l10n::set(dirname(__FILE__) . '/../../locales/' . $_lang . '/date') === false && $_lang != 'en') {
l10n::set(dirname(__FILE__) . '/../../locales/en/date');
}
l10n::set(dirname(__FILE__) . '/../../locales/' . $_lang . '/main');
l10n::set(dirname(__FILE__) . '/../../locales/' . $_lang . '/plugins');
}
开发者ID:HackerMajor,项目名称:root,代码行数:11,代码来源:prepend.php
示例10: detect
public function detect()
{
$langs = $this->options();
if (isset($_COOKIE['wLang']) && isset($langs[$_COOKIE['wLang']])) {
return $_COOKIE['wLang'];
}
$lang = '';
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
$negotiation = new ptlis\ConNeg\Negotiation();
$lang = $negotiation->languageBest($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'application/json;q=1,application/xml;q=0.7,text/html;q=0.3');
}
if (!$lang) {
return $this->default;
}
$l10 = new l10n();
$map = $l10->catalog($lang);
if ($map && isset($map['localeFallback'])) {
return $map['localeFallback'];
}
return $this->default;
}
开发者ID:nilBora,项目名称:konstruktor,代码行数:21,代码来源:Lang.php
示例11: jsToolBar
protected static function jsToolBar()
{
$res = dcPage::cssLoad(dcPage::getPF('dcLegacyEditor/css/jsToolBar/jsToolBar.css')) . dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/jsToolBar.js'));
if (isset($GLOBALS['core']->auth) && $GLOBALS['core']->auth->getOption('enable_wysiwyg')) {
$res .= dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/jsToolBar.wysiwyg.js'));
}
$res .= dcPage::jsLoad(dcPage::getPF('dcLegacyEditor/js/jsToolBar/jsToolBar.dotclear.js')) . '<script type="text/javascript">' . "\n" . "//<![CDATA[\n" . "jsToolBar.prototype.dialog_url = 'popup.php'; " . "jsToolBar.prototype.iframe_css = '" . 'body{' . 'font: 12px "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif;' . 'color : #000;' . 'background: #f9f9f9;' . 'margin: 0;' . 'padding : 2px;' . 'border: none;' . (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl' ? 'direction:rtl;' : '') . '}' . 'pre, code, kbd, samp {' . 'font-family:"Courier New",Courier,monospace;' . 'font-size : 1.1em;' . '}' . 'code {' . 'color : #666;' . 'font-weight : bold;' . '}' . 'body > p:first-child {' . 'margin-top: 0;' . '}' . "'; " . "jsToolBar.prototype.base_url = '" . html::escapeJS($GLOBALS['core']->blog->host) . "'; " . "jsToolBar.prototype.switcher_visual_title = '" . html::escapeJS(__('visual')) . "'; " . "jsToolBar.prototype.switcher_source_title = '" . html::escapeJS(__('source')) . "'; " . "jsToolBar.prototype.legend_msg = '" . html::escapeJS(__('You can use the following shortcuts to format your text.')) . "'; " . "jsToolBar.prototype.elements.blocks.options.none = '" . html::escapeJS(__('-- none --')) . "'; " . "jsToolBar.prototype.elements.blocks.options.nonebis = '" . html::escapeJS(__('-- block format --')) . "'; " . "jsToolBar.prototype.elements.blocks.options.p = '" . html::escapeJS(__('Paragraph')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h1 = '" . html::escapeJS(__('Level 1 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h2 = '" . html::escapeJS(__('Level 2 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h3 = '" . html::escapeJS(__('Level 3 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h4 = '" . html::escapeJS(__('Level 4 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h5 = '" . html::escapeJS(__('Level 5 header')) . "'; " . "jsToolBar.prototype.elements.blocks.options.h6 = '" . html::escapeJS(__('Level 6 header')) . "'; " . "jsToolBar.prototype.elements.strong.title = '" . html::escapeJS(__('Strong emphasis')) . "'; " . "jsToolBar.prototype.elements.em.title = '" . html::escapeJS(__('Emphasis')) . "'; " . "jsToolBar.prototype.elements.ins.title = '" . html::escapeJS(__('Inserted')) . "'; " . "jsToolBar.prototype.elements.del.title = '" . html::escapeJS(__('Deleted')) . "'; " . "jsToolBar.prototype.elements.quote.title = '" . html::escapeJS(__('Inline quote')) . "'; " . "jsToolBar.prototype.elements.code.title = '" . html::escapeJS(__('Code')) . "'; " . "jsToolBar.prototype.elements.br.title = '" . html::escapeJS(__('Line break')) . "'; " . "jsToolBar.prototype.elements.blockquote.title = '" . html::escapeJS(__('Blockquote')) . "'; " . "jsToolBar.prototype.elements.pre.title = '" . html::escapeJS(__('Preformated text')) . "'; " . "jsToolBar.prototype.elements.ul.title = '" . html::escapeJS(__('Unordered list')) . "'; " . "jsToolBar.prototype.elements.ol.title = '" . html::escapeJS(__('Ordered list')) . "'; " . "jsToolBar.prototype.elements.link.title = '" . html::escapeJS(__('Link')) . "'; " . "jsToolBar.prototype.elements.link.href_prompt = '" . html::escapeJS(__('URL?')) . "'; " . "jsToolBar.prototype.elements.link.hreflang_prompt = '" . html::escapeJS(__('Language?')) . "'; " . "jsToolBar.prototype.elements.img.title = '" . html::escapeJS(__('External image')) . "'; " . "jsToolBar.prototype.elements.img.src_prompt = '" . html::escapeJS(__('URL?')) . "'; " . "jsToolBar.prototype.elements.img_select.title = '" . html::escapeJS(__('Media chooser')) . "'; " . "jsToolBar.prototype.elements.post_link.title = '" . html::escapeJS(__('Link to an entry')) . "'; " . "jsToolBar.prototype.elements.removeFormat = jsToolBar.prototype.elements.removeFormat || {}; " . "jsToolBar.prototype.elements.removeFormat.title = '" . html::escapeJS(__('Remove text formating')) . "'; ";
if (!$GLOBALS['core']->auth->check('media,media_admin', $GLOBALS['core']->blog->id)) {
$res .= "jsToolBar.prototype.elements.img_select.disabled = true;\n";
}
$res .= "jsToolBar.prototype.toolbar_bottom = " . (isset($GLOBALS['core']->auth) && $GLOBALS['core']->auth->getOption('toolbar_bottom') ? 'true' : 'false') . ";\n";
$res .= "\n//]]>\n" . "</script>\n";
return $res;
}
开发者ID:nikrou,项目名称:dotclear,代码行数:14,代码来源:dc.legacy.editor.behaviors.php
示例12: Fire
public function Fire()
{
$bug = new Bug($this->input->_id);
try {
$bug->FetchInto();
} catch (\phalanx\data\ModelException $e) {
EventPump::Pump()->RaiseEvent(new StandardErrorEvent(l10n::S('BUG_ID_NOT_FOUND')));
return;
}
$this->bug = $bug;
$this->bug_reporter = $bug->FetchReporter();
$this->attributes = $bug->FetchAttributes();
$this->comments = $bug->FetchComments();
}
开发者ID:rsesek,项目名称:Bugdar2,代码行数:14,代码来源:bug_view.php
示例13: Fire
public function Fire()
{
if ($this->input->do == 'fire') {
$user = new User();
$user->set_condition('email = :email');
$user->email = $this->input->email;
try {
$user = $user->Fetch();
} catch (phalanx\data\ModelException $e) {
EventPump::Pump()->RaiseEvent(new StandardErrorEvent(l10n::S('LOGIN_FAILED')));
return;
}
if ($user->password != md5(sha1($this->input->password) . $user->salt)) {
EventPump::Pump()->RaiseEvent(new StandardErrorEvent(l10n::S('LOGIN_FAILED')));
return;
}
// We need to set _COOKIE values so that if the last_event requires
// authentication, we can return the correct state.
$expires = time() + 60 * 60 * 5;
$this->_SetCookie('bugdar_user', $user->user_id, $expires);
$this->_SetCookie('bugdar_pass', $user->authkey, $expires);
$last_event = NULL;
if ($this->input->last_event) {
$last_event = unserialize(base64_decode($this->input->last_event));
$class = $last_event[0];
$input = $last_event[1];
if (!class_exists($class)) {
$path = phalanx\base\CamelCaseToUnderscore($class);
$path = preg_replace('/_event$/', '', $path);
require_once BUGDAR_ROOT . "/events/{$path}.php";
}
$last_event = new $class($input);
}
$this->successful = TRUE;
EventPump::Pump()->PostEvent($last_event ?: new StandardSuccessEvent('home', l10n::S('LOGIN_SUCCESSFUL')));
return;
}
// Find the first non-UserLoginEvent that was processed. If the event
// hasn't been finished, then this event preempted it and we should
// store its data so that the user can return to what she was doing.
$events = EventPump::Pump()->GetAllEvents();
foreach ($events as $event) {
if (!$event instanceof $this && $event->state() != EventPump::EVENT_FINISHED) {
$this->last_event = base64_encode(serialize(array(get_class($event), $event->input)));
break;
}
}
}
开发者ID:rsesek,项目名称:Bugdar2,代码行数:48,代码来源:user_login.php
示例14: __construct
public function __construct()
{
$this->registry = registry::getInstance();
$this->session = $this->registry["session"];
$this->cookie = $this->registry["cookie"];
$this->view = $this->registry["views"];
$this->themes = $this->registry["themes"];
$this->path = $this->registry["path"];
$this->l10n = l10n::getInstance();
$this->html = html::getInstance();
$this->ajax = new ajax();
$this->pagination = pagination::getInstance();
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$this->data = $_POST;
} else {
$this->data = NULL;
}
$this->isAjax = $this->isAjax();
}
开发者ID:ravenlp,项目名称:CodiceCMS,代码行数:19,代码来源:controller.class.php
示例15: init
/**
* Load the translation strings
*
* @access public
* @author Jerome Bogaerts, <[email protected]>
* @param common_ext_Extension $extension
* @param string langCode
* @return mixed
*/
public static function init(common_ext_Extension $extension, $langCode)
{
// if the langCode is empty do nothing
if (empty($langCode)) {
throw new Exception("Language is not defined");
}
//init the ClearFw l10n tools
l10n::init();
$basePath = $extension->getDir();
if (!empty($_GET['ext']) && is_string($_GET['ext'])) {
$shownExtension = common_ext_ExtensionsManager::singleton()->getExtensionById($_GET['ext']);
if (!empty($shownExtension)) {
try {
$basePath = $shownExtension->getDir();
$baseUrl = $shownExtension->getConstant('BASE_URL');
} catch (common_exception_Error $e) {
// let the current base path be used...
}
}
}
l10n::set($basePath . 'locales' . DIRECTORY_SEPARATOR . $langCode . DIRECTORY_SEPARATOR . 'messages');
}
开发者ID:nagyist,项目名称:tao-core,代码行数:31,代码来源:class.I18n.php
示例16: Fire
public function Fire()
{
// If an ID was passed, try updating the record.
if ($this->input->_id) {
try {
$this->usergroup = new Usergroup($this->input->_id);
$this->usergroup->FetchInto();
} catch (\phalanx\data\ModelException $e) {
EventPump::Pump()->RaiseEvent(new StandardErrorEvent(l10n::S('ERROR_INVALID_ID')));
return;
}
} else {
// Otherwise, create a new one.
$this->usergroup = new Usergroup();
}
if ($this->input->_method == 'POST') {
$title = \phalanx\data\Cleaner::HTML($this->input->title);
if (empty($title)) {
EventPump::Pump()->RaiseEvent(new StandardErrorEvent('The title field is required.'));
return;
}
$this->usergroup->title = $title;
if (!empty($this->input->display_title)) {
$this->usergroup->display_title = \phalanx\data\Cleaner::HTML($this->input->display_title);
}
$mask = 0;
foreach ($this->input->permissions as $name => $bit) {
$mask += $bit * Usergroup::$permissions[$name];
}
$this->usergroup->mask = $mask;
// Save the actual record.
if ($this->input->_id) {
$this->usergroup->Update();
} else {
$this->usergroup->Insert();
}
}
}
开发者ID:rsesek,项目名称:Bugdar2,代码行数:38,代码来源:admin_usergroups_edit.php
示例17: __construct
/**
* Constructor.
*
* @param oktCore $okt
* @param array $aConfig
* @param string $sBase
* @param string $sTplFamily
* @param string $sBaseUrl
* @return void
*/
public function __construct($okt, $aConfig, $sBase, $sTplFamily, $sBaseUrl = '/')
{
$this->okt = $okt;
$this->aConfig = $aConfig;
$this->sTplFamily = $sTplFamily;
$this->sBase = util::formatAppPath($sBase, false, false);
$this->sBaseUrl = $sBaseUrl;
$this->loadTemplatesPaths();
$this->loadTemplatesInfos();
l10n::set(OKT_LOCALES_PATH . '/' . $this->okt->user->language . '/admin.templates.config');
# téléchargement d'un template
if (!empty($_GET['tpl_download']) && !empty($_GET['tpl_id']) && array_key_exists(rawurldecode($_GET['tpl_id']), $this->getTplInfos()) && !empty($_GET['tpl_family']) && rawurldecode($_GET['tpl_family']) == $this->sTplFamily) {
$this->dowloadTemplate(rawurldecode($_GET['tpl_id']));
}
# suppression d'un template
if (!empty($_GET['tpl_delete']) && !empty($_GET['tpl_id']) && array_key_exists(rawurldecode($_GET['tpl_id']), $this->getTplInfos()) && !empty($_GET['tpl_family']) && rawurldecode($_GET['tpl_family']) == $this->sTplFamily) {
$this->deleteTemplate(rawurldecode($_GET['tpl_id']));
$this->okt->redirect($this->sBaseUrl . 'tpl_family=' . rawurlencode($this->sTplFamily) . '&tpl_deleted=1');
}
if (isset($this->okt->page) && !empty($_GET['tpl_family']) && rawurldecode($_GET['tpl_family']) == $this->sTplFamily) {
$this->okt->page->messages->success('tpl_deleted', __('c_a_tpl_config_tpl_deleted'));
}
}
开发者ID:jewelhuq,项目名称:okatea,代码行数:33,代码来源:class.oktTemplatesSet.php
示例18: getISOcodes
/**
* ISO Codes
*
* Returns an array predefined languages ISO codes as you can find on
* {@link http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes}
* The list as additionnal IETF codes as pt-br.
*
* @param boolean $flip Flip resulting array
* @param boolean $name_with_code Prefix (code) to names
* @return array
*/
public static function getISOcodes($flip = false, $name_with_code = false)
{
if (empty(self::$langs)) {
self::$langs = array('aa' => 'Afaraf', 'ab' => 'Аҧсуа', 'ae' => 'avesta', 'af' => 'Afrikaans', 'ak' => 'Akan', 'am' => 'አማርኛ', 'an' => 'Aragonés', 'ar' => 'العربية', 'as' => 'অসমীয়া', 'av' => 'авар мацӀ', 'ay' => 'aymar aru', 'az' => 'azərbaycan dili', 'ba' => 'башҡорт теле', 'be' => 'Беларуская', 'bg' => 'български език', 'bh' => 'भोजपुरी', 'bi' => 'Bislama', 'bm' => 'bamanankan', 'bn' => 'বাংলা', 'bo' => 'བོད་ཡིག', 'br' => 'brezhoneg', 'bs' => 'bosanski jezik', 'ca' => 'Català', 'ce' => 'нохчийн мотт', 'ch' => 'Chamoru', 'co' => 'corsu', 'cr' => 'ᓀᐦᐃᔭᐍᐏᐣ', 'cs' => 'česky', 'cu' => 'ѩзыкъ словѣньскъ', 'cv' => 'чӑваш чӗлхи', 'cy' => 'Cymraeg', 'da' => 'dansk', 'de' => 'Deutsch', 'dv' => 'ދިވެހި', 'dz' => 'རྫོང་ཁ', 'ee' => 'Ɛʋɛgbɛ', 'el' => 'Ελληνικά', 'en' => 'English', 'eo' => 'Esperanto', 'es' => 'español', 'et' => 'Eesti keel', 'eu' => 'euskara', 'fa' => 'فارسی', 'ff' => 'Fulfulde', 'fi' => 'suomen kieli', 'fj' => 'vosa Vakaviti', 'fo' => 'Føroyskt', 'fr' => 'français', 'fy' => 'Frysk', 'ga' => 'Gaeilge', 'gd' => 'Gàidhlig', 'gl' => 'Galego', 'gn' => "Avañe'ẽ", 'gu' => 'ગુજરાતી', 'gv' => 'Ghaelg', 'ha' => 'هَوُسَ', 'he' => 'עברית', 'hi' => 'हिन्दी', 'ho' => 'Hiri Motu', 'hr' => 'Hrvatski', 'ht' => 'Kreyòl ayisyen', 'hu' => 'Magyar', 'hy' => 'Հայերեն', 'hz' => 'Otjiherero', 'ia' => 'Interlingua', 'id' => 'Bahasa Indonesia', 'ie' => 'Interlingue', 'ig' => 'Igbo', 'ii' => 'ꆇꉙ', 'ik' => 'Iñupiaq', 'io' => 'Ido', 'is' => 'Íslenska', 'it' => 'Italiano', 'iu' => 'ᐃᓄᒃᑎᑐᑦ', 'ja' => '日本語', 'jv' => 'basa Jawa', 'ka' => 'ქართული', 'kg' => 'KiKongo', 'ki' => 'Gĩkũyũ', 'kj' => 'Kuanyama', 'kk' => 'Қазақ тілі', 'kl' => 'kalaallisut', 'km' => 'ភាសាខ្មែរ', 'kn' => 'ಕನ್ನಡ', 'ko' => '한국어', 'kr' => 'Kanuri', 'ks' => 'कश्मीरी', 'ku' => 'Kurdî', 'kv' => 'коми кыв', 'kw' => 'Kernewek', 'ky' => 'кыргыз тили', 'la' => 'latine', 'lb' => 'Lëtzebuergesch', 'lg' => 'Luganda', 'li' => 'Limburgs', 'ln' => 'Lingála', 'lo' => 'ພາສາລາວ', 'lt' => 'lietuvių kalba', 'lu' => 'Luba-Katanga ', 'lv' => 'latviešu valoda', 'mg' => 'Malagasy fiteny', 'mh' => 'Kajin M̧ajeļ', 'mi' => 'te reo Māori', 'mk' => 'македонски јазик', 'ml' => 'മലയാളം', 'mn' => 'Монгол', 'mo' => 'Limba moldovenească', 'mr' => 'मराठी', 'ms' => 'bahasa Melayu', 'mt' => 'Malti', 'my' => 'ဗမာစာ', 'na' => 'Ekakairũ Naoero', 'nb' => 'Norsk bokmål', 'nd' => 'isiNdebele', 'ne' => 'नेपाली', 'ng' => 'Owambo', 'nl' => 'Nederlands', 'nl-be' => 'Nederlands (Belgium)', 'nn' => 'Norsk nynorsk', 'no' => 'Norsk', 'nr' => 'Ndébélé', 'nv' => 'Diné bizaad', 'ny' => 'chiCheŵa', 'oc' => 'Occitan', 'oj' => 'ᐊᓂᔑᓈᐯᒧᐎᓐ', 'om' => 'Afaan Oromoo', 'or' => 'ଓଡ଼ିଆ', 'os' => 'Ирон æвзаг', 'pa' => 'ਪੰਜਾਬੀ', 'pi' => 'पाऴि', 'pl' => 'polski', 'ps' => 'پښتو', 'pt' => 'Português', 'pt-br' => 'Português (Brasil)', 'qu' => 'Runa Simi', 'rm' => 'rumantsch grischun', 'rn' => 'kiRundi', 'ro' => 'română', 'ru' => 'Русский', 'rw' => 'Ikinyarwanda', 'sa' => 'संस्कृतम्', 'sc' => 'sardu', 'sd' => 'सिन्धी', 'se' => 'Davvisámegiella', 'sg' => 'yângâ tî sängö', 'sh' => 'Srpskohrvatski', 'si' => 'සිංහල', 'sk' => 'slovenčina', 'sl' => 'slovenščina', 'sm' => "gagana fa'a Samoa", 'sn' => 'chiShona', 'so' => 'Soomaaliga', 'sq' => 'Shqip', 'sr' => 'српски језик', 'ss' => 'SiSwati', 'st' => 'seSotho', 'su' => 'Basa Sunda', 'sv' => 'Svenska', 'sw' => 'Kiswahili', 'ta' => 'தமிழ்', 'te' => 'తెలుగు', 'tg' => 'тоҷикӣ', 'th' => 'ไทย', 'ti' => 'ትግርኛ', 'tk' => 'Türkmen', 'tl' => 'Tagalog', 'tn' => 'seTswana', 'to' => 'faka Tonga', 'tr' => 'Türkçe', 'ts' => 'xiTsonga', 'tt' => 'татарча', 'tw' => 'Twi', 'ty' => 'Reo Mā`ohi', 'ug' => 'Uyƣurqə', 'uk' => 'Українська', 'ur' => 'اردو', 'uz' => "O'zbek", 've' => 'tshiVenḓa', 'vi' => 'Tiếng Việt', 'vo' => 'Volapük', 'wa' => 'Walon', 'wo' => 'Wollof', 'xh' => 'isiXhosa', 'yi' => 'ייִדיש', 'yo' => 'Yorùbá', 'za' => 'Saɯ cueŋƅ', 'zh' => '中文', 'zh-hk' => '中文 (香港)', 'zh-tw' => '中文 (臺灣)', 'zu' => 'isiZulu');
}
$langs = self::$langs;
if ($name_with_code) {
foreach ($langs as $k => &$v) {
$v = '(' . $k . ') ' . $v;
}
}
if ($flip) {
return array_flip($langs);
}
return $langs;
}
开发者ID:nonconforme,项目名称:SocialAggregator,代码行数:27,代码来源:lib.l10n.php
注:本文中的l10n类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论