如何更改 drupal 7 中的标签分隔符?
我想将我的内容类型的术语参考字段中的标签分隔符(使用自动完成术语小部件(标记))从“,”更改为“+”或其他内容(在 Drupal 7 中),因为该字段需要填充多个语言(波斯语和英语)单词,“,”在波斯语中是“Ì”,所以我想要这两种语言中相同的字符,以防止用户更改键盘输入。
我现在该怎么办?
谢谢。
I want to change tag separator in a Term reference field of my content type (using Autocomplete term widget (tagging)) from "," to "+" or maybe something else (in Drupal 7) because this field needs to be filled with multi lingual (persian and english) words and the "," is "،" in persian so I want a character which is same in both of these languages to prevent user changing their keyboard input.
What shoud I do now?
thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以查看活动标签模块。
You may take a look at Active Tags module.
根据此问题,我的问题的理想答案是:
在 drupal/include/common.inc 文件中,更改行
$regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^" ,]*))%x';
至$regexp = '%(?:^|,|Ì|\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",|ì|]*))%xu';
现在英语和波斯语逗号均可用作分隔符,因此我不必担心是否更改键盘语言!
Ideal answer of my question according to this issue is :
in drupal/include/common.inc file, change line
$regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
to$regexp = '%(?:^|,|،|\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",|،|]*))%xu';
Now both English and Persian comma is available for separator so I will not worry about change keyboard language or not!