glueckpress/wordpress-post-language

Create plugin (summary)

glueckpress opened this issue · 5 comments

Create a plugin implementing

  • a filterable language selection in the Publish Post meta box
  • a default set of languages to select from
  • opt-in initiation of the plugin by add_filter( 'post_language', $locale ) where $locale would be the main language of the site that would also be the default language for posts set by the plugin
  • a UI element for the previously mentioned opt-in initiation in Settings > General
  • public template tags get_the_post_language() and the_post_language()
  • public post_class() method for setting the lang and dir attributes on post elements

Do you have Contributer?

For code not yet. Please feel free to! :)

With experience of WordPress since its inception, multilingual CMS since 2001, and multilingual TYPO3 since 2011, I would encourage the implementation of a “core plugin” logic. This process allows development of individual modules to be managed and continued by a dedicated team without it slowing or impacting the development of the remainder of the core. TYPO3 core extensions work very well in this way, and can be managed separately very well. It would also allow for a faster update procedures and the modular means have been well proven through the life of WP plugins.

@mhmli Thanks for your comment. Generally I’m on the same page, I just don’t see how the feature could be developed as a plugin without ditching the idea of making post_language a new property of WP_Post. However, that’s only my interpretation of where the feature would belong in principle. It certainly should and will be discussed.

@glueckpress I agree that post_language belongs to the core and a standard list of fields. It's surprising that, given the age of WordPress, it's not already there.