HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.


This discussion is related to the Simplified Chinese Locale(简体中文) addon.
andelfandelf New
edited December 2011 in Localization

用户名已经没问题. 需要处理的是 mentions.

config 目录下新建 bootstrap.after.php

class Chn_MentionsFormatter {
public static function GetMentions($String) {
  // This one grabs mentions that start at the beginning of $String
  if (count($Matches) > 1) {
     $Result = array_unique($Matches[1]);
     return $Result;
  return array();
public static function FormatMentions($Mixed) {
    // return "..................................";
    $Mixed = preg_replace(
       '\1'.Anchor('@\2', '/profile/\\2'),
    return $Mixed;
Gdn::FactoryInstall('MentionsFormatter', 'Chn_MentionsFormatter', NULL, Gdn::FactoryInstance);


  • 我自己修改了functions.validation.php中用户名的正则表达式了。

  • @reddddd 看了好长时间源代码, 终于发现还是留了自定义入口的. 哈哈...

  • 我添加了这个文件。仍然不工作。中文用户名还是不支持。求详解

Sign In or Register to comment.