{"action":"created","issue":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1213","labels_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1213/labels{/name}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1213/comments","events_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1213/events","html_url":"https://github.com/jhipster/generator-jhipster/issues/1213","id":59820548,"number":1213,"title":"Locale switching only if chosen from menu","user":{"login":"danaki","id":1043805,"avatar_url":"https://avatars.githubusercontent.com/u/1043805?v=3","gravatar_id":"","url":"https://api.github.com/users/danaki","html_url":"https://github.com/danaki","followers_url":"https://api.github.com/users/danaki/followers","following_url":"https://api.github.com/users/danaki/following{/other_user}","gists_url":"https://api.github.com/users/danaki/gists{/gist_id}","starred_url":"https://api.github.com/users/danaki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danaki/subscriptions","organizations_url":"https://api.github.com/users/danaki/orgs","repos_url":"https://api.github.com/users/danaki/repos","events_url":"https://api.github.com/users/danaki/events{/privacy}","received_events_url":"https://api.github.com/users/danaki/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-04T16:16:39Z","updated_at":"2015-03-05T09:43:54Z","closed_at":"2015-03-05T09:43:54Z","body":"I have Russian as the only language of my app. I don't have any language switching menu there. First inconvenience is that I have to edit language settings across several files like app.js and language.service.js. It would be great to have a config for that. Other thing is that because I don't have language switch, tmhDynamicLocale is not initialized and angulars' locale files not loaded. It would be more reliable to watch for $translate's current language and set locale accordingly:\r\n```\r\n    ...\r\n    .run(...) {\r\n        ...\r\n        $rootScope.$watch(function() {\r\n            return $translate.use();\r\n        }, function(language) {\r\n            tmhDynamicLocale.set(language);\r\n        });\r\n    }\r\n```\r\n\r\nHowever I'm not angular guru, this snippet just worked for me.\r\nJhipster 1.10.0"},"comment":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/comments/77334505","html_url":"https://github.com/jhipster/generator-jhipster/issues/1213#issuecomment-77334505","issue_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1213","id":77334505,"user":{"login":"jdubois","id":316835,"avatar_url":"https://avatars.githubusercontent.com/u/316835?v=3","gravatar_id":"","url":"https://api.github.com/users/jdubois","html_url":"https://github.com/jdubois","followers_url":"https://api.github.com/users/jdubois/followers","following_url":"https://api.github.com/users/jdubois/following{/other_user}","gists_url":"https://api.github.com/users/jdubois/gists{/gist_id}","starred_url":"https://api.github.com/users/jdubois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdubois/subscriptions","organizations_url":"https://api.github.com/users/jdubois/orgs","repos_url":"https://api.github.com/users/jdubois/repos","events_url":"https://api.github.com/users/jdubois/events{/privacy}","received_events_url":"https://api.github.com/users/jdubois/received_events","type":"User","site_admin":false},"created_at":"2015-03-05T09:43:53Z","updated_at":"2015-03-05T09:43:53Z","body":"If you have just one language, you could even remove all translations and write directly the text in your pages.\r\nYes you can \"force\" the language like you did, it's like emulating what the menu does, so it works the same in the end."}}