From f10f77601436e26109951a077843b80b06506595 Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Fri, 11 Apr 2014 10:35:21 +0300 Subject: [PATCH] #46 update the instructions for changing language (+example) --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 807c2fb..44e51f6 100644 --- a/README.md +++ b/README.md @@ -38,11 +38,14 @@ If you need internationalization support, load specified moment.js locale file f ``` -Than trigger global moment.js language (e.g. in your app's run() callback): +Then call the `amMoment.changeLanguage()` method (e.g. inside your app's run() callback): -```html -$window.moment.lang('de'); +```js +myapp.run(function(amMoment) { + amMoment.changeLanguage('de'); +}); ``` + ### Configuration Parameter `preprocess`(e.g: `unix`, `utc`) would pre-execute before.