You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Look at the content language selection: it shows Finnish, while the hierarchy shows class names in English.
Open one of the branches of the hierarchy (e.g. 0 GENERAL...)
The classes in the branch now have class names in Finnish
Additional information (e.g. screenshots) about the problem
I think the problem happens because of the way the SKOSMOS_SEARCH_LANG cookie is handled. The idea is to remember the content language chosen by the user. But in step 4 above, by the time the hierarchy renders, the SKOSMOS.content_language setting is still en and thus the top level of the hierarchy is rendered in English. When SKOSMOS.content_language is changed later by the search component, it's already too late, although subsequent request (for example opening new branches in step 6) will use the new setting.
Either we should drop the SKOSMOS_SEARCH_LANG cookie completely (it seems to me that having two mechanisms for this - the clang parameter and the cookie - is a recipe for problems) or if we need to keep it, then at least it should be processed very early in the frontend code (or possibly already on the backend side) so that SKOSMOS.content_language always matches the language set in the cookie.
The browser you used when the problem appeared
Firefox
The text was updated successfully, but these errors were encountered:
Now that I think this critically, it's probably better to drop the search language cookie and just use the UI language as the only language cookie. The reason bein, UI language options are particular to a single Skosmos instance, but content languages (i.e. search language) is particular to any given vocabulary. Switching from one vocab to another could cause further problems if the search language cookie is not updated accordingly.
It's way clearer to handle search language with clang and anylang parameters.
URL address of the page where you encountered the problem
http://localhost/Skosmos/ykl/fi/
Description of the problem
fi
and reload the page with the?clang=fi
attribute)Additional information (e.g. screenshots) about the problem
I think the problem happens because of the way the SKOSMOS_SEARCH_LANG cookie is handled. The idea is to remember the content language chosen by the user. But in step 4 above, by the time the hierarchy renders, the SKOSMOS.content_language setting is still
en
and thus the top level of the hierarchy is rendered in English. When SKOSMOS.content_language is changed later by the search component, it's already too late, although subsequent request (for example opening new branches in step 6) will use the new setting.Either we should drop the SKOSMOS_SEARCH_LANG cookie completely (it seems to me that having two mechanisms for this - the clang parameter and the cookie - is a recipe for problems) or if we need to keep it, then at least it should be processed very early in the frontend code (or possibly already on the backend side) so that SKOSMOS.content_language always matches the language set in the cookie.
The browser you used when the problem appeared
Firefox
The text was updated successfully, but these errors were encountered: