我有一个 helpers/config.js
Accounts.ui.config({
});
在玩了几个小时并进行搜索后,我一直无法找到一种方法来更改在顶部 Bootstrap 导航中生成的 tex SIGNIN/JOIN。
我该如何做才是正确的?
最佳答案
这个包正在使用 anti:i18n
如中所见:
https://github.com/ianmartorell/meteor-accounts-ui-bootstrap-3/blob/master/package.js#L15
所以你可以做的就是简单地覆盖在那里声明的默认 i18n 字符串:
https://github.com/ianmartorell/meteor-accounts-ui-bootstrap-3/blob/master/i18n/en.i18n.js#L25
我从未使用过anti:i18n
但我认为将此代码放入您的应用程序应该可以解决问题:
i18n.map("en",{
loginButtonsLoggedOutDropdown: {
signIn: "YOUR SIGN IN TEXT",
up: "YOUR JOIN TEXT"
}
});
您还需要使用此命令将包添加到您的应用中:
meteor add anti:i18n
那是因为即使包是ian:accounts-ui-bootstrap-3
的依赖, 你不能在你的应用程序中访问它,你必须明确地将它列为你的应用程序的依赖项。
关于meteor - 如何更改 ian :accounts-ui-bootstrap-3 上的下拉文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28735350/