Plugin Author
pepe
(@pputzer)
There is an open GitHub ticket for multilingual support. The API allows for injecting arbitrary Settings objects since version 4.0.0, but so far no one has taken up the challenge.
Hm… could be two languages selected at once for hyphenation for a bilingual website?
Plugin Author
pepe
(@pputzer)
Not via the GUI. I’m not sure manually setting anthing but the default language via the Settings page is feasible from a UI standpoint. Any suggestions for a good user interface?
pepe, I suggest to look to select2 (multiple selection with tags), where languages will be tags, from Multiple select boxes with labels example https://select2.github.io/examples.html
Plugin Author
pepe
(@pputzer)
Thanks for the suggestion. It might work for the common case, if we find a clever algorithm for mapping WordPress language codes to the pre-selected list of candidate languages. However, there will be edge cases like when you want to have two related languages (e.g. medieval Latin and classical Latin) that can’t be differentiated by their ISO code.
WPML have option for custom languages mapping, user-created locale. For example, I did not liked zh-TW locale name for Traditional Chinese, since I did not wanted /zh-TW/ language prefix for that version on a client website. I needed cn for /cn/. So I defined it in WPML, works very well.
Also, when it comes to WPML, it has a handy wpml-config.xml, from which you can read language configuration for website.
Clever algorithm will have to walk through available languages and offer user-defined locales if needed with full instruction, but this is further future. The closest step with maximum usefulness might be WPML compatibility (checkbox in UI – if checked, wpml-config.xml is read and options taken from it). Its multilingual standard de-facto for WordPress commercial websites, where much content reside.
Plugin Author
pepe
(@pputzer)
Reading an XML file on every request is probably not so performant. I think users with custom needs like that should probably add a MU plugin to make the necessary adjustments via filters rather than the GUI.
Plugin Author
pepe
(@pputzer)
I’m closing this here. The feature request is noted, but further discussion should happen on GitHub.
Plugin Author
pepe
(@pputzer)
A quick update: A first implementation of automatic language handling will be in wp-Typography 5.0. It will provide filter hooks if full customization is desired.