Skip to content
This repository has been archived by the owner on Dec 1, 2019. It is now read-only.

Conditional loading of language/locale specific css and php files #970

Closed
nukaga opened this issue Nov 7, 2019 · 2 comments
Closed

Conditional loading of language/locale specific css and php files #970

nukaga opened this issue Nov 7, 2019 · 2 comments

Comments

@nukaga
Copy link

nukaga commented Nov 7, 2019

Description
In the current site design, the title is too large in Japanese and Chinese.
The center alignment is also extraordinary.

#118 (comment)
#118 (comment)

Solution
Is it possible to separate the title and body CSS in several languages?

@waviaei
Copy link

waviaei commented Nov 8, 2019

I think a possible neat and WordPress-like solution is, for example;

  • If the site setting is ja, the theme will additionally look for and load ja.css on top of style.css.
  • If the site setting is en_gb, the theme will look for en_gb, then en...

and so on . A conditional or auto-loading of language specific php would be nice too, because then we can dequeue the latin font, and replace with, e.g., ja font if only the site is ja.

I know that Justin Tadlock's Hybrid theme series has had this customization for a long time. I have contributed to his Stargazer theme's ja.css. Also as a bonus, this way, it makes easier for polyglot community to add contribute language specific files later its release.

https://github.com/justintadlock/stargazer

I believe in latest Hybrid core system, the relevant codes are around here:
https://themehybrid.com/docs/hybrid-core-i18n
https://github.com/justintadlock/hybrid-core/tree/master/src/Lang

Would this be feasible solution to adopt this into twentytwenty? (event better, the core?)
(of course, not adding the Hybrid-Core into twentytwenty but adopting some relevant codes)

@nukaga nukaga changed the title Optimized for non-latin design Conditional loading of language/locale specific css and php files Nov 8, 2019
@ianbelanger79
Copy link
Contributor

Has been moved to trac https://core.trac.wordpress.org/ticket/48800

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants