Skip to content
This repository has been archived by the owner on Jun 19, 2018. It is now read-only.

Better translations API #393

Closed
mattlewis92 opened this issue Jul 15, 2016 · 4 comments
Closed

Better translations API #393

mattlewis92 opened this issue Jul 15, 2016 · 4 comments

Comments

@mattlewis92
Copy link
Owner

Provide a better story for translating strings with angular translate etc

@z3ntu
Copy link

z3ntu commented Jul 19, 2016

Quick question without looking at it very much:
How can you integrate that with angular-translate?

@mattlewis92
Copy link
Owner Author

Sorry I didn't have time to write any docs. There is an example test that shows how to use it here: 247f2c1#diff-26039e1b6e6997694f04d9b660430955R188

tl;dr

// in a .run() block
calendarConfig.i18nStrings.weekNumber = function(translationParams) {
  return $translate.instant('KEY', {weekNumberParam: translationParams.weekNumber});
};

@z3ntu
Copy link

z3ntu commented Jul 19, 2016

Thanks. I will try it tomorrow!

@mattlewis92
Copy link
Owner Author

I haven't yet cut a new release so you won't be able to try it just yet, you can fork the module and rebuild the dist files your self though if you need it right away

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants