Skip to content

No support for xx-xx style locale codes (en-US, zh-TW etc.) #854

Closed
@ghost

Description

I discovered this issue when I was playing around with langswitcher plugin. I noticed that xx-xx style locales doesn't show up on front-end and after further investigation in this topic @rhukster pointed me to this:

Grav\Common\Languages\LanguageCodes::getNames() only knows how to lookup xx style language codes. This would have to be improved to support xx-xx styles too.

https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Language/LanguageCodes.php

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions