all the language support in drupal 8 - at drupalaton 2014
DESCRIPTION
All the language support in Drupal 8 traning slides from Drupalaton 2014TRANSCRIPT
All the language support in Drupal 8
Gábor Hojtsy
Drupal 8
Moar, betterer
multilingual
*****
Who are you?
Who are we?
1080+ contributors*
*Based on issue participation
Why are we doing this?
1. Reduce complexity 2. Add missing features
Drupal core
Drupal corelocale
Drupal corelocale
l10n_update
Drupal corelocale
l10n_update l10n_client
Drupal corelocale translation
l10n_update l10n_client
Drupal corelocale translation
l10n_update
i18n
l10n_client
Drupal corelocale translation
l10n_update
i18n … … …
l10n_client
Drupal corelocale translation
l10n_update
i18n … … … variable
l10n_client
Drupal corelocale translation
l10n_update
i18n … … … variable
l10n_client
… …
Drupal corelocale translation
l10n_update
i18n
i18n_views
… … … variable
l10n_client
… …
Drupal corelocale translation
l10n_update
i18n
i18n_views
… … … variable
webform_localization
l10n_client
… …
Drupal corelocale translation
l10n_update
i18n
i18n_views
… … … variable
webform_localization
l10n_client
entity_translation
… …
Drupal corelocale translation
l10n_update
i18n
i18n_views
… … … variable
webform_localization
l10n_client
entity_translation title
… …
Drupal corelocale translation
l10n_update
i18n
i18n_views
… … … variable
webform_localization
l10n_client
entity_translation title
… …
tmgmt
Language !
Language !
Interface translation
8
Language !
Content translation
é
Interface translation
8
Language !
Content translation
é
Interface translation
8
Configuration translation
X
Environment setup
PHP 5.4.2
DRUPAL 8 MULTILINGUAL CHANGES SUMMARY v. 2.0 for Drupalaton / drupal8multilingual.org / @d8mi
INSTALLER Language list first
Detects browser language
Integrates with automated translation download
Picking a language enables Language and Interface Translation
LANGUAGE Language module as base language service
Simplified language config (no domain/prefix, etc)
2 special instead of 1 (und: Not specified, zxx: Not applicable)
English can be deleted (not even added if installed foreign)
CONTENT
LANGUAGE
Content type language support more flexible (one screen setup)
Language selector field is freely positioned
Same flexibility + new language support on other “content”
Views to customize pages based on content language
BLOCK
LANGUAGE
Blocks got language visibility
More things are blocks
NEGOTIATIO
N
Defaults to path prefix negotiation (80%), configuration there
Added admin language option (move it up to first if used)
Browser detection configurable + more accurate
Fallback language configurable (don’t change site default)
USERS Users have language preference + admin language if applicable
Internally up to 3 different languages per user
NAMES Transliteration built-‐in for machine names
INTERFACE
TRANSLATION
Interface translation (locale) module now only doing this
One central directory for .po files -‐ staging/version control
File import and automated update settings
Import will not time out or eat up lots of memory
Translation UI revamped (much quicker editing)
Plural versions editable with specific UI
Edited strings become custom, can be separately exported
Default configuration translated
English can be “translated to”
CONTENT
TRANSLATION
Field translation based module in core
Old content-‐copy translation not available anymore
Configuration on the field and sub-‐field level (eg. image fields)
Integrated with search indexing (in core) and API
Node access is also language aware
CONFIG
TRANSLATION
All new in core, replaces many of i18n’s features
Not configurable, one flat permission for all translation
Index page for all configuration
Translation tabs, integrates with interface translation
Be aware of what is content/configuration/interface
MENUS Interface (built-‐in), configuration (views) and content (custom)
Most tricky part is which one is which
APIs (picks) JavaScript translation API unified with PHP API
Simpler Entity API makes working with multilingual content easier
More (HTML5) language markup for more accessibility/machines
Configuration schema system to support configuration translation
WORKFLOW Will be provided by contributed modules
hojtsy.hu (bottom right)
!
Know exact language of every detail on the site
!
First step in installer
"#
!
Language as its own module
"#
!
Content language defaults
"#
!
Views
"#
!
Block language
"#
!
More language selection options
"#
!
Transliteration
"#
!- Delete English - Flexible selection - Block visibility - Views - Flexible configuration - First in installer - Know language
Language !
Content translation
é
Interface translation
8
Configuration translation
X
8
Integrate and simplify
8
Automated translation download / update
"#
8
Deployment friendlyfile storage
"#
8
Whole new translation UI
"#
8
Custom string tracking
"#
8
Translate to English
"#
- “Translate to” English - Whole new UI - Custom string tracking - Deployment friendly - Automated updates
8
Language !
Content translation
é
Interface translation
8
Configuration translation
X
é
Unify and make flexible
Applies to all “content” through fields
"# é
Search compatible
"# é
Views
"# é
- Node access compatible - Search compatbile - Field/sub-field level - Views - Migration
é
Language !
Content translation
é
Interface translation
8
Configuration translation
X
X
Cover all configuration
Entities
Content
Nodes Users
Comments Terms
Contact messages
Menu links
ConfigurationViews
Vocabularies
Contact categories
Fields
Site info
User emails
OtherPath
aliases
Menus
X
Intuitive access to translation
"# X
X
Shipped view
Interface translation
Configuration translation
888
X Custom view
X
Shipped view
Interface translation
Configuration translation
888
X Custom view
Shipped role
Custom role
X
Shipped view
Interface translation
Configuration translation
888
X Custom view
Shipped role
Custom role888
X
X
Block placement(Has title, language)
Custom block content entity
(Has field content, language)
Field configuration
Field configuration
Field configuration
X
Menu(Has name, language)
Custom items Config itemsSoftware items
Block placement(Has title, language)
- All of configuration - In-place tabs - Central overview - Think about source
X
Language !
Content translation
é
Interface translation
8
Configuration translation
X
What’s missing?
Better workflow and 3rd party integration in contrib