I\'m learning to use meteor.
Is it possible to easily localize accounts.ui components?
Here is a trick I have used. Simple, but works:
Template.header.rendered = function() {
$('#login-sign-in-link').text('Přihlásit se ▾');
$('.login-close-text').text('Zavřít nabídku');
$('.sign-in-text-google').text('Přihlásit se přes Google');
$('.sign-in-text-facebook').text('Přihlásit se přes FB');
//etc...
};
This is a slightly hacky solution, you could remove the accounts-ui
package you have and add it in manually. Find the accounts-ui
branch on meteor's github repo and find all the contents in the accounts-ui
package such as: login_buttons_dialogs.html, login_buttons.html, etc.
You could then edit and copy these files into your meteor project directly with the custom text in the language you would like.
Meteor hasn't implemented internationalization but its on the roadmap. What you could do is use meteorite and install a localization package such as simple-i18n
in conjunction with the manually edited accounts-ui
files to give your users a multi-lingual experience or simply offer accounts-ui in a different language.