Magento does not have something to redirect users based on location or language to a specific store view.
The code in the link you mentioned should work, in case you have different urls for both languages and both of them are different from the base url.
Here is an example:
Base URL: www.example.com/
En url www.example.com/en/
NL url www.example.com/nl
But if your en url is www.example.com/ and the NL url is www.example.com/nl it won't work. You will get an infinite loop when the user should see the EN language.
To make it work, remove this code:
if ($_SERVER['REQUEST_URI'] === '/') {
header('Location: '.getStoreForLanguage()->getBaseUrl());
exit;
}
and replace
Mage::run();
with
Mage::run(getStoreForLanguage()->getCode(), 'store');