Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 302528

Drupal does not allow W3C compliant language codes where you target a numeric region

$
0
0

I have a need to create a Spanish site targeting a Latin American audience. It is my understanding that valid language code would be es-419 for this, but Drupal doesn't allow me to create this, instead it throws an error message:

Notice: Undefined index: langcode in language_admin_edit_form_validate() (line 365 of core/modules/language/language.admin.inc).
may only contain characters a-z, underscores, or hyphens.

The W3C page that is linked on the very same page where you can define a custom language even lists this language code as one of it's examples:
"es-419 Spanish as used in Latin America"
http://www.w3.org/International/articles/language-tags/

Other use cases for this is if you wish to create an English language site targeting a Middle Eastern audience, where (I think) it would make sense to use en-145 as language code:

http://schneegans.de/lv/?tags=en-145&format=text

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue categoryBug because valid languages are not allowed
Unfrozen changesUnfrozen because it is a bug in both Drupal 7 and Drupal 8

Viewing all articles
Browse latest Browse all 302528

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>