I have a site that will ultimately support 4 languages and 2 countries (US & Canada, English and Spanish)
I'm wondering what's the best way to set up the directory structure?
Right now, I have a root site called site.com:
This will take you to a page where you choose your country and language.
Ideally, I want to have the directory like so:
site.com/ca/en/ (Canada English)
site.com/ca/fr/ (Canada French)
site.com/us/en/ (US English)
site.com/us/es/ (US Spanish)
But that will mean I will be putting a "ca" and a "us" virtual directory and language virtual directories inside that. IS that good practice, or should I do something like:
site.com/ca-en/ (Canada English)
site.com/ca-fr/ (Canada French)
site.com/us-en/ (US English)
site.com/us-es/ (US Spanish)
edit: I have done the following:
There is a dummy directory: /ca/ and /us/ in the application. They both have a default.aspx which is just a redirect. In my case, I redirect them to their English language sites:
For example: site.com/ca/ --> site.com/ca/en/ site.com/us/ --> site.com/us/en/
if site.com is entered, you are pushed to a language selection page. Basically, I use a regular expression in Global.asax on every request to look for the language/culture string.
This has the following benefits. Country separation. So you have control over site.com/ca/ or site.com/us/ and are able to provide a simple URL for each country.
Anyway, the Virtual directories /en/, /fr/ and /es/ are inside their respective country physical folders.
So you have the following (Virtual Dirs are in bold):
site.com/ca/en/ (default) site.com/ca/fr/ site.com/us/en/ (default) site.com/us/es/
What this means is that you need to have five (identical) applications, except you can use the URL to get the current language and country (and point it to the right database).