def get_users_language(user):
if getattr(settings, '<STR_LIT>', False):<EOL><INDENT>try:<EOL><INDENT>app_label, model_name = settings.NOTIFICATION_LANGUAGE_MODULE.split('<STR_LIT:.>')<EOL>model = models.get_model(app_label, model_name)<EOL>language_model = model._default_manager.get(user__id__exact=user.id)<EOL>if hasattr(language_model, '<STR_LIT>'):<EOL><INDENT>return language_model.language<EOL><DEDENT><DEDENT>except (ImportError, ImproperlyConfigured, model.DoesNotExist):<EOL><INDENT>raise LanguageStoreNotAvailable<EOL><DEDENT><DEDENT>raise LanguageStoreNotAvailable<EOL>
Returns site-specific language for this user. Raises
LanguageStoreNotAvailable if this site does not use translated
notifications.