Internet.nl
Internet.nl copied to clipboard
Language switching in news items
Sometimes swithing the language when on a news item does not give the corresponding news item in the other language but the newest.
That is not sometimes. This is always the case because not all news items (and blog items?) could be found in both languages. The code could be better there (a lot better actually now that I look at it :) https://github.com/internetstandards/Internet.nl/blob/43922a64ebadc35379b85183eb504498087995e1/interface/views/init.py#L328 and first look if the item can be found in the new language before defaulting to the index page.