Using the specified patch, it is now possible to set a users initial Locale (and even currency) based on the webapp mount point. This works with a single store, and does not require the use virtual hosts. This is especially useful when setting up sitemap.xml, which allows crawlers (like google) to correctly locate and traverse products and services in multiple languages.
Here is an example where "ecomclone" has been modified to Locale=fr with a mount point of "/fr".
<!-- <init-param name="Currency" value="EUR"/> -->
mount-point="/fr" <------- SPECIFY MOUNT
<init-param name="Locale" value="fr"/> <------- SPECIFY LOCALE
The below sitemap.xml would allow products with the "/fr" path to be indexed in french.
<?xml version="1.0" encoding="UTF-8"?>
The attached patch modifies setDefaultStoreSettings in ProductEvents.java, which is called once during the initial session creation.
After a user enters the URL, they are still free to modify the language, as long as the page supports it (like the default demo store). The patch also allows the Currency to be forced as well, and it does appear to work, but should be more throughly tested.
Although this patch bypasses the requirement for multiple stores, there may be issues with other aspects of the store, like emails. However, it is no different than a user who enters your English-based ecommerce store, selects "french", and attempts a checkout.