Part of lp.answers.browser.question View In Hierarchy
Known subclasses: lp.answers.browser.question.QuestionAddView
It provides a method to check if the selected language is supported and another to create the form field to select the question language.
This mixin adapts its context to IQuestionTarget, so it will work if the context either provides IQuestionTarget directly or if an adapter exists.
|Method||chosen_language||Return the language chosen by the user.|
|Method||unsupported_languages_warning||Macro displaying a warning in case of unsupported languages.|
|Method||question_target||Return the IQuestionTarget related to the context.|
|Method||supported_languages||Return the list of supported languages ordered by name.|
|Method||createLanguageField||Create a field with a vocabulary to edit a question language.|
|Method||shouldWarnAboutUnsupportedLanguage||Test if the warning about unsupported language should be displayed.|
|Parameters||the_form||The form that will use this field.|
|Returns||A form.Fields instance containing the language field.|
A warning will be displayed if the request's language is not listed as a spoken language for any of the support contacts. The warning will only be displayed one time, except if the user changes the request language to another unsupported value.