{"action":"opened","issue":{"url":"https://api.github.com/repos/NatLibFi/Skosmos/issues/231","labels_url":"https://api.github.com/repos/NatLibFi/Skosmos/issues/231/labels{/name}","comments_url":"https://api.github.com/repos/NatLibFi/Skosmos/issues/231/comments","events_url":"https://api.github.com/repos/NatLibFi/Skosmos/issues/231/events","html_url":"https://github.com/NatLibFi/Skosmos/issues/231","id":68677404,"number":231,"title":"Hierarchy shown in wrong language if locale for content language not defined","user":{"login":"osma","id":1132830,"avatar_url":"https://avatars.githubusercontent.com/u/1132830?v=3","gravatar_id":"","url":"https://api.github.com/users/osma","html_url":"https://github.com/osma","followers_url":"https://api.github.com/users/osma/followers","following_url":"https://api.github.com/users/osma/following{/other_user}","gists_url":"https://api.github.com/users/osma/gists{/gist_id}","starred_url":"https://api.github.com/users/osma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osma/subscriptions","organizations_url":"https://api.github.com/users/osma/orgs","repos_url":"https://api.github.com/users/osma/repos","events_url":"https://api.github.com/users/osma/events{/privacy}","received_events_url":"https://api.github.com/users/osma/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NatLibFi/Skosmos/labels/bug","name":"bug","color":"ff4d51"},{"url":"https://api.github.com/repos/NatLibFi/Skosmos/labels/content-language","name":"content-language","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/NatLibFi/Skosmos/milestones/8","html_url":"https://github.com/NatLibFi/Skosmos/milestones/1.1","labels_url":"https://api.github.com/repos/NatLibFi/Skosmos/milestones/8/labels","id":998711,"number":8,"title":"1.1","description":"","creator":{"login":"osma","id":1132830,"avatar_url":"https://avatars.githubusercontent.com/u/1132830?v=3","gravatar_id":"","url":"https://api.github.com/users/osma","html_url":"https://github.com/osma","followers_url":"https://api.github.com/users/osma/followers","following_url":"https://api.github.com/users/osma/following{/other_user}","gists_url":"https://api.github.com/users/osma/gists{/gist_id}","starred_url":"https://api.github.com/users/osma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osma/subscriptions","organizations_url":"https://api.github.com/users/osma/orgs","repos_url":"https://api.github.com/users/osma/repos","events_url":"https://api.github.com/users/osma/events{/privacy}","received_events_url":"https://api.github.com/users/osma/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":11,"state":"open","created_at":"2015-02-27T12:26:50Z","updated_at":"2015-04-15T13:05:55Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-04-15T13:05:55Z","updated_at":"2015-04-15T13:05:55Z","closed_at":null,"body":"## At which URL did you encounter the problem?\r\nhttp://dev.finto.fi/ic/fi/page/11P315311?clang=it\r\n\r\n## What steps will reproduce the problem?\r\n1. Use Iconclass with content language set to Italian\r\n2. Go to concept \"abate\" (above URL)\r\n3. Click on \"Hierarchy\" tab\r\n\r\n## What is the expected output? What do you see instead?\r\n\r\nThe hierarchy is shown, but with English terms, not Italian as expected.\r\n\r\nThe Apache error log shows this PHP warning:\r\n[Wed Apr 15 16:00:07 2015] [error] [client 128.214.71.212] PHP Warning:  Unsupported language 'it', not setting locale in /var/www/dev.finto.fi/controller/Controller.php on line 73\r\n\r\nThe problem seems to be that the REST hierarchy method (and probably other REST methods too) rely on setting the locale to pass language information. But in this case, 'it' is not configured in config.inc so there is no information about which locale to use (and in any case, an Italian locale may not exist on the server). The locale setting fails and the hierarchy terms are returned in another language (English here, but could probably be something else).\r\n\r\nTo fix this I think we need to figure out a better way to propagate language information from the REST controller to the model. Adding locales does not scale well, for example Lexvo or AGROVOC have lots of languages.\r\n\r\n"}}