Opened 10 years ago
Closed 9 years ago
#31736 closed enhancement (worksforme)
Add locale to get_body_class to enable local WordPress themes/plugins to enable different design for locales
Reported by: | ShinichiN | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | I18N | Keywords: | has-patch |
Focuses: | template | Cc: |
Description
I want to suggest that get_body_class adds locales to the body tag.
Would be very nice if WordPress supports locale-en_US, locale-sv_SE or locale-ja as body classes because non-English speakers can submit themes both for English writers and local languages bloggers.
For users who use child themes to optimize a theme to their languages, it would be easier to send pull requests and patches to the original themes.
For example, this blog post by @nao shows us how to optimize English based themes for Japanese blogs.
http://en.naoko.cc/2015/01/29/optimizing-english-based-wordpress-theme-for-japanese-blog/
One of the basic ideas of this theme "Nu2013" by @nukaga in the WordPress theme repository is that the author wanted to offer Japanese optimized version of TwentyThirteen theme.
https://wordpress.org/themes/nu2013/
If themes use
language_attributes()
correctly, they could use an attribute selector to make that determination.