title: Multiple dialects of languages in Django-CMS
body: <p>all, I'm attempting to create a multi-lingual website which must support (among others) both US-English and UK-English.</p>
  
  <p>My settings contains:</p>
  
  <pre><code>LANGUAGES = (
      ('de', u'Deutsch'),
      ('en_GB', u'English (UK)'),
      ('en', u'English (US)'),
      ('es', u'Español'),
      ('fr', u'Français'),
      ('pt', u'Português'),
  )
  </code></pre>
  
  <p>All of the other languages are all working fine; the user can switch languages and things work well.  The problem is en_GB.</p>
  
  <p>I've tried changing the above configuration to 'en-GB', 'en-gb or 'en_gb' with no change in behavior.</p>
  
  <p>It would appear that the middleware only supports the first two letters for language pathing?  How can I properly support multiple dialects of the base language?  This could easily be es-US, es-MX, es-ES or fr-FR, fr-CA or de-DE, de-AT, de-CH, etc.</p>
  
  <p>I'm using Django-CMS 2.3.5 (which is the latest production release as of this writing) on Django 1.4.5 on Python 2.7.2.</p>
  
  <p>UPDATE: I appear to now have it working.  I think there were two things that were preventing progress for me.  1) when it comes to English, it is probably best to not have one as 'en' and another as 'en-gb'. 2) in all my experimenting, I suspect I had messed up Django-CMS' records in the DB.  Deleting all my pages and starting over seems to have fixed this (NOTE: This would suck in a production environment even more than it does here!)</p>
  
  <p>In the end, I've found these settings to work for me:</p>
  
  <pre><code>LANGUAGE_CODE = 'en-us'
  
  LANGUAGES = (
      ('en-us', u'English (US)'),
      ('de', u'Deutsch'),
      ('en-gb', u'English (UK)'),
      ('es', u'Español'),
      ('fr', u'Français'),
      ('pt', u'Português'),
  )
  
  CMS_LANGUAGES = LANGUAGES
  
  CMS_LANGUAGE_CONF = {
      'de': ['en-gb', 'en-us', 'fr', 'es', 'pt'],
      'en-gb': ['en-us', 'fr', 'es', 'de', 'pt'],
      'en-us': ['en-gb', 'fr', 'es', 'de', 'pt'],
      'es': ['pt', 'fr', 'en-gb', 'en-us', 'de'],
      'fr': ['es', 'pt', 'en-gb', 'en-us', 'de'],
      'pt': ['es', 'fr', 'en-gb', 'en-us', 'de'],
  }
  
  CMS_HIDE_UNTRANSLATED = False
  </code></pre>
  
  <p>Also, apparently Django-CMS' template tag page_language_url will only return lower-case language path elements, so en_GB/en-GB may work on one level, but the UI will fail to match the selected language because of this.</p>