the multilingual bloggin software dilemma · media libraries are key • meta data (alt-text,...

66
<prologue>

Upload: others

Post on 20-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

<prologue>

Page 2: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 3: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

in_array( $me, $french ); // very false

Page 4: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

Learned one word:

Page 5: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

(supposedly fits in almost every situation) https://twitter.com/wordpress_fr/status/421565255362150400https://twitter.com/patriciabt70/status/421670222903250944

“Putain”

Page 6: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

</prologue>

Page 7: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

The Multilingual Blogging Software Dilemma

…and ways to solve it.

Page 8: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

2003

Page 9: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

http://ma.tt/2003/01/the-blogging-software-dilemma/

“The Blogging Software Dilemma”

Page 10: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

What to do?“[…] forward compatibility has lately been in my mind […] My logging software hasn’t been updated for months, and the main developer has disappeared […] could use the existing codebase to create a fork […]”

Page 11: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

Let’s do it.“If you’re serious about forking b2 I would be interested in contributing.”

Page 12: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 13: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

2014

Page 14: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

21%, YAY!

Page 15: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

…in one language per site?

Page 16: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

WordPress* in your language

• http://codex.wordpress.org/WordPress_in_Your_Language

• http://codex.wordpress.org/Translating_WordPress

• http://make.wordpress.org/polyglots/

*WordPress: core, themes, plugins. Not: content.

Page 17: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

Language files/languages/de_CH.mo

/languages/de_CH.po

/languages/de_DE.mo

/languages/de_DE.po

/languages/fr_FR.mo

/languages/fr_FR.po

…etc.

Page 18: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

Message-level translation

__( 'Putain ce que j’ai faim!', 'domain' );

_e( 'Putain ce que j’ai faim!', 'domain' );

!

#: some-file.php:1

msgid "Putain ce que j’ai faim!"

msgstr "Gosh, I’m hungry!"

Page 19: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

Provide context_x( 'Putain ce que j’ai faim!', 'Paris', 'domain' );

!

#: some-file.php:1

#, php-format

msgctxt "Paris"

msgid "Putain ce que j'ai faim!"

msgstr "Champagne for all!"

Page 20: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

Authored content in multiple languages?

Page 21: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

the_post(); // duh.

Page 22: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

The Multilingual Blogging Software Dilemma

Page 23: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

The Multilingual Blogging Software Dilemma

Page 24: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

Def: dilemmafunction faire_A() {

return 'putain';

}

!

function faire_B() {

return 'putain encore';

}

Page 25: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

function multilingual_site() {

return 'not use WordPress'; // putain

}

!

function multilingual_wordpress_site() {

return 'depend on a plugin'; // putain encore

}

Page 26: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

What to do?“[…] forward compatibility has lately been in my mind […] My logging software hasn’t been updated for months, and the main developer has disappeared […] could use the existing codebase to create a fork […]”

Page 27: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

–random international user

“Make it a core feature!!”

Page 28: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

–random core developer

“Putain, no!”

Page 29: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

Multilingual WordPress

• Not a core feature, because multilingual content is an edge case.

• Can be achieved with a plugin.

→ Forward compatibility depends on plugin developers.

→ When plugin is disabled, content must still work.

Page 30: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

The Multilingual Core Feature#enquelquesorte

Page 31: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

WordPress Multisite/**

* 1 installation

* multiple sites = multiple languages

*/

function multilingual_wordpress_site() {

return 'use core with multisite'; // YAY, putain!

}

Page 32: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

✔ Clean, SEO-friendly URLs.

✔ Performance as good as WordPress gets, no extra rewrites.

✔ Varying plugins[, themes, users, custom post types] per language.

✔ Rock-solid, because it’s part of core.

✔ Future-proof, because it’s part of core and wordpress.com uses it.

Page 33: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

Setup Multisite

• Create a network. http://codex.wordpress.org/Create_A_Network

• Create a site for each language inside the network

• That’s it, start blogging! ← Your site is multilingual here.

• Core, theme, plugins: localized by language files (message based).

• Authored content: localized by author(s).

Page 34: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

–you

“What about media libraries?”

Page 35: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

–Multisite

“Putain all the things!”

Page 36: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

Media @ Multisite

• Shared media libraries don’t exist in WordPress.

• WordPress does not allow for multiple post-to-post relationships.

• Attachments and post images are unique and need to be physically

present in the media library of the site their parent post belongs to.

Page 37: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

–you

“Duplicated media libraries SUCK!!”

Page 38: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

Media libraries are key

• Meta data (alt-text, title, description/caption) should be translatable.

• Audio files can be recorded/overdubbed in multiple languages.

• Videos can have subtitles or overdubs.

→ Unique* media libraries are key for multilingual content!

*Physical assets could/should be assignable to multiple post objects.

Page 39: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

Plugin CandyWant some?

Page 40: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

• Connect translated posts[, pages, custom post types].

• Display links for available languages on singular and archive pages.

• Redirect based on browser’s language settings.

• Create/edit translation in same edit screen as original post.

• Automatically duplicate post-image to media libraries of translated posts.

• Author biographic info in all languages.

• Choose back-end language independently of front-end.

• Duplicate an entire site into a new site/language.

Page 41: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 42: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 43: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 44: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 45: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 46: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 47: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 48: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 49: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 50: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 51: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 52: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 53: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 54: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 55: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 56: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 57: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 58: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 59: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 60: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed
Page 61: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

Wrap-up

Page 62: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

Multilingual WordPress Multisite✔ Core feature.

✔ Easy setup.

✔ No extra plugin needed.

✔ Rock-solid performance.

✔ Hassle-free maintenance.

✔ Future-super-proof.

✔ Candy if you want some.

Page 63: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

What’s not to like?!

Page 64: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

Merci! <3

Page 65: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

Caspar Hübinger@glueckpress

!

glueckpress.com

marketpress.com

inpsyde.com

Page 66: The Multilingual Bloggin Software Dilemma · Media libraries are key • Meta data (alt-text, title, description/caption) should be translatable. • Audio files can be recorded/overdubbed

Photo Credits

• Matt Mullenweg: http://ma.tt/2011/05/balloon-ride/mcm_9050/ (as advised on http://ma.tt/about/)

• Mike Little: http://mikelittle.org/

• Caspar Hübinger: http://stil-etage.de