1
A
回答
1
2
对不起,重新打开这个线程,如果有人土地在这里寻找一种方式来Drupal的7为翻译字段标签,阅读下文。
在Drupal 7中,引入了核心功能template_preprocess_field()
。在我们的template.php文件中使用它,我们可以通过一个t()
函数传递每个字段标签。
/**
* Implements template_preprocess_field().
*/
function THEMENAME_preprocess_field(&$vars, $hook) {
// Check to make sure there's a label and it's visible.
if(isset($vars['label']) && $vars['label_hidden'] === FALSE)
{
$vars['label'] = t($vars['label']);
}
}
相关问题
- 1. SilverStripe翻译字段标签
- 2. Drupal内容类型与字段的Hundereds
- 3. Drupal 7 - 在内容类型字段中保存用户标识
- 4. 动态字段为Drupal内容类型
- 5. Drupal 7 - 内容类型中的内容类型 - 类似字段集合
- 6. 翻译的内容字段标签在Drupal 8的节点页面中以原始语言显示,我如何显示翻译的标签?
- 7. 内容类型中不同字段的css类的drupal选项
- 8. Django表单字段标签翻译
- 9. Drupal 7 - 在特定内容类型字段中添加数据
- 10. Drupal - 在Pathauto中使用内容类型字段
- 11. Drupal视图和标签翻译
- 12. 如何获取drupal中内容类型的字段值
- 13. Drupal 5:自定义内容类型中的CCK字段
- 14. 引用Drupal中内容类型的字段
- 15. Drupal 7中内容类型的字段列表
- 16. 内容类型中的Drupal条件字段显示
- 17. 搜索Drupal内容类型中的2个字段
- 18. Drupal - 内容类型的编辑标签选项没有显示
- 19. 在iFrame中翻译内容
- 20. Google翻译字体标签
- 21. Drupal 7.12翻译自定义字段
- 22. Drupal 7字段共享节点翻译
- 23. 从内容类型Drupal中将值写入CCK字段6
- 24. 在节点外显示Drupal内容类型字段
- 25. 将字段添加到屏幕“新内容类型”在Drupal
- 26. 在Drupal检索从内容类型字段列表7
- 27. 标签翻译
- 28. Drupal:内容类型的URL?
- 29. drupal 7元标记由内容类型
- 30. 有条件的字段drupal 8的内容类型
您是否尝试过翻译界面? – Paul 2010-03-02 16:54:43