【问题标题】:How can I change dropdown text on ian:accounts-ui-bootstrap-3如何更改 ian:accounts-ui-bootstrap-3 上的下拉文本
【发布时间】:2015-04-28 09:51:33
【问题描述】:

我有一个 helpers/config.js

Accounts.ui.config({

});

在玩了几个小时并搜索之后,我一直无法找到更改顶部引导导航中生成的 tex SIGNIN/JOIN 的方法。

如何以正确的方式做到这一点?

【问题讨论】:

    标签: meteor meteor-accounts meteor-helper


    【解决方案1】:

    这个包使用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 add anti:i18n' 后,我将您的代码放在我的 config.js 中,它按预期工作。
    • 如果我只想将其用作登录而不是注册,是否可以删除“/”?
    猜你喜欢
    • 2020-06-30
    • 1970-01-01
    • 2017-12-10
    • 2017-08-31
    • 2015-07-27
    • 1970-01-01
    • 1970-01-01
    • 2018-09-27
    • 2016-08-04
    相关资源
    最近更新 更多