Skip to content
This repository has been archived by the owner. It is now read-only.

Better translations API #393

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

Comments

Projects
None yet
2 participants
@mattlewis92
Copy link
Owner

mattlewis92 commented Jul 15, 2016

Provide a better story for translating strings with angular translate etc

@z3ntu

This comment has been minimized.

Copy link

z3ntu commented Jul 19, 2016

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

@mattlewis92

This comment has been minimized.

Copy link
Owner Author

mattlewis92 commented Jul 19, 2016

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

This comment has been minimized.

Copy link

z3ntu commented Jul 19, 2016

Thanks. I will try it tomorrow!

@mattlewis92

This comment has been minimized.

Copy link
Owner Author

mattlewis92 commented Jul 19, 2016

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.
You can’t perform that action at this time.