包括Django中语言的自定义URL前缀

包括Django中语言的自定义URL前缀,django,internationalization,django-1.11,Django,Internationalization,Django 1.11,除了通常的语言代码如en和ar之外,我还试图在实现django语言翻译的同时包含国家代码,这些代码将附加到url中。我正试着做这样的事情 https://docs.djangoproject.com/uae-ar/1.10/howto/ # this will be Arabic https://docs.djangoproject.com/uae-fr/1.10/howto/ # this will be French 下面是我的设置文件变量 LANGUAGE_COD

除了通常的语言代码如
en
ar
之外,我还试图在实现django语言翻译的同时包含国家代码,这些代码将附加到url中。我正试着做这样的事情

https://docs.djangoproject.com/uae-ar/1.10/howto/       # this will be Arabic
https://docs.djangoproject.com/uae-fr/1.10/howto/       # this will be French
下面是我的设置文件变量

LANGUAGE_CODE = 'en-us'
LANGUAGES = (
   ('en', _('English')),
   ('uae-ar', _('Arabic')),
   ('uae-fr', _('French')),
)
我想知道实施这种方法的最佳实践。如果我错过了什么,请一定告诉我