'OpenERP provides languages which may not make sense and/or may not
be understood by the web client\'s libraries.
Fix those here.
:param dict context: context to fix'

def _fix_lang(self, context):

    lang = context.get('lang')
    if (lang == 'ar_AR'):
        lang = 'ar'
    if (lang in babel.core.LOCALE_ALIASES):
        lang = babel.core.LOCALE_ALIASES[lang]
    context['lang'] = (lang or 'en_US')
