Search code examples
meteormeteor-accountsmeteor-helper

How can I change dropdown text on ian:accounts-ui-bootstrap-3


I have a helpers/config.js

Accounts.ui.config({

});

After playing around with this for a couple hours and searching I've been unable to find a way to change the tex SIGNIN/JOIN that is generated in the top bootstrap nav.

How do I do it the right way?


Solution

  • This package is using anti:i18n as seen in :

    https://github.com/ianmartorell/meteor-accounts-ui-bootstrap-3/blob/master/package.js#L15

    So what you can do is simply override the default i18n strings declared there :

    https://github.com/ianmartorell/meteor-accounts-ui-bootstrap-3/blob/master/i18n/en.i18n.js#L25

    I never used anti:i18n but I think throwing this code in your app should do the trick :

    i18n.map("en",{
      loginButtonsLoggedOutDropdown: {
        signIn: "YOUR SIGN IN TEXT",
        up: "YOUR JOIN TEXT"
      }
    });
    

    You also need to add the package to your app using this command :

    meteor add anti:i18n
    

    That's because even if the package is a dependency of ian:accounts-ui-bootstrap-3, you are not allowed to access it in your app, you must explicitly list it as a dependency of your app.