Whilst trying to test a fields in core patch I was trying to set up another language.
I added the language on the Languages page (admin/config/regional/language).
Then I added a user and set their language to the new language and logged in as that user.
Then (as admin) I went to export the built-in interface (admin/config/regional/translate/export) but the resulting .pot file only contained entries for javascript translations and none for any modules.
After making sure my language domain was set up correctly I realised that I hadn't set up language negotiation correctly on admin/config/regional/language/configure
I think that it might be useful to warn the user if they have more than one language enabled that language negotiation should be set to a value other than default for users to actually be able to use the languages.
I've attached a patch that adds a warning to the status report (admin/reports/status) if there's more than one language and no language negotiation.
I think if the user adds more than one language then the warning probably ought to appear on the language list page too (admin/config/regional/language). Perhaps it should be requirements_error instead or requirements_warning - is there a use case for a site with more than one language but language negotiation set to none?
| Comment | File | Size | Author |
|---|---|---|---|
| locale_requirements.patch | 1.41 KB | alexpott |
Comments
Comment #1
alexpottUpdating to correct tags
Comment #2
Bojhan commentedI understand this can be an issue, but seems rather small - moving this to Drupal 8, seems like a better fit looking at the current work on this UI already.
Comment #3
lomo commentedI believe this frustration is now a thing of the past, language negotiation is already vastly improved in Drupal 8. If you turn on more than one language, there is default "URL-based" (path prefix) language negotiation, but there are several other fall-backs you can enable. I think you'll be happy. :-)