-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Language meta information should reflect actual application language (instead of hardcoded EN) #1234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Fix is not exactly correct. For the language dialects it would produce invalid HTML. str_replace('_', '-', \Yii::app()->language); |
|
Okay, I changed the commits. I must confess it doesn't look very elegant. Why can't we also use languages with dashes internally? |
|
I would rather "hide" this logic |
|
Never mind. intl works with both dash and underscore. Dash separator is more popular. |
|
Yeah, I've just verified that. |
…ge and country in locale id.
Currently, the layout of the basic and advanced app templates has English hardcoded as language:
<html lang="EN">Since language is a dynamic attribute in the application config. Based on Paul's suggestion, I propose to use this: