Drupal - Use another language than "default" as standard

Drupal 7?

The language negotiation is extendable, you just need to implement hook_language_negotiation_info(). In there, you can do whatever you want, like always default to swedish for now. It also looks like you can limit to what languages you can switch to, I am not sure how that exactly works, though.

Not sure what to do once you add more languages, but you could for example call other negotiation callbacks in yours and fallback to swedish if it not one of the languages you want displayed.


This question is old, but I think that this answer could be still useful to someone. A module with this functionality now esists, you can find it here: https://drupal.org/project/fallback_language_negotation

I'm a developer, but I don't know enough Drupal to write modules and implement hooks. I badly needed this functionality, but I couldn't do it by myself.

That module it's also very simple, so it's good for beginners to understand how to write modules.

Tags:

I18N L10N