继续Drupal分享精神 QQ群:107748121 站长QQ:2275288328 skype: hellodrupal【drupal交流+drupal 建站+theme制作】
登录 注册

Drupal i18n i18n_get_lang() 判断当前语言名称

Drupal i18n 使用开发的时候,会经常用到的几个函数。很方便使用i18n api来完成任务。

函数 i18n_get_lang()

返回值: 当前语言名称

比如: en, zh-hans

在page模板里面直接可以根据

$language->language 来判断当前语言名称。

 

 

 

评论

С прошедшими! Желаю как можно

С прошедшими!
Желаю как можно скорее войти в рабочий режим и радовать нас, читателей, новыми материалами ))

发表新评论

此内容将保密,不会被其他人看见。
  • 自动将网址与电子邮件地址转变为链接。
  • 自动断行和分段。
  • You can use BBCode tags in the text.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

更多关於格式化选项的信息

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.