Earlier I was using ember-i18n which was installed using bower and globally available. I could use translations everywhere without importing anything.
But now we are switching to ember-cli-i18n installed via package.json and which can be used in route, model, component, controller because of application.inject they are doing in initializer.
Problem is I want to use translations in my router.js file as well but unable to do so, like this
this.resource("posts", { path: "/" + (t("posts.slug", {})) }
locale/en.js looks like below
export default { posts: { slug: "posts" } }
Any help or suggestion how to achieve this?
Aucun commentaire:
Enregistrer un commentaire