Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phabricator 修改默认语言的方法 #14

Open
daocatt opened this issue Apr 2, 2021 · 4 comments
Open

Phabricator 修改默认语言的方法 #14

daocatt opened this issue Apr 2, 2021 · 4 comments

Comments

@daocatt
Copy link

daocatt commented Apr 2, 2021

/src/applications/auth/engine/PhabricatorAuthSessionEngine.php

Line: 1126

按照如下方法修改:

// Switch to the user's translation.    
$user_translation = $user->getTranslation();
if(!$user->isLoggedIn())
{
    $user_translation = 'zh_Hans';
}
PhabricatorEnv::setLocaleCode($user_translation);

tips: 需要先安装中文语言包

@ericyangpan
Copy link
Owner

管理员可以全局设置这个值吧?

@daocatt
Copy link
Author

daocatt commented May 10, 2021

没找到设置的地方,看了下这里是固定写的
然后就是读取用户的设置,需要每个用户自行设置

@ericyangpan
Copy link
Owner

Sorry,是我看错啦,是 by person 的

@Camouflager
Copy link

Camouflager commented Jun 29, 2021

domain.com/settings/builtin/global/ 可以管理员全局修改设置

UI路径:All Applications->搜Settings->右上角Create Global Defaults

c.f. https://secure.phabricator.com/T4103#178803

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants