Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Drupal8 Problem of multilingualization of contents
Search
kazukomurata
October 30, 2018
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Drupal8 Problem of multilingualization of contents
kazukomurata
October 30, 2018
More Decks by kazukomurata
See All by kazukomurata
Drupal SDC入門
kazukomurata
0
160
長期運用のためのDrupal開発入門
kazukomurata
0
86
Migrate Drupal7 to Drpual8
kazukomurata
0
300
Drupal8 Migrate API
kazukomurata
0
370
Drupalのデモサイト作って明日までに!と言われたら
kazukomurata
0
890
Drupal8 CKEditor TIps
kazukomurata
0
460
Drupal7 & 8 翻訳コンテンツの罠
kazukomurata
0
290
Drupal7×Cloudfront×SSL
kazukomurata
0
290
Drupal8 State API と Configuration API
kazukomurata
0
300
Featured
See All Featured
[SF Ruby Conf 2025] Rails X
palkan
2
1.4k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
660
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
470
30 Presentation Tips
portentint
PRO
1
390
Raft: Consensus for Rubyists
vanstee
141
7.7k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
A Tale of Four Properties
chriscoyier
163
24k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Typedesign – Prime Four
hannesfritz
42
3.2k
エンジニアに許された特別な時間の終わり
watany
108
250k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
520
Transcript
Drupal8 コンテンツ多言語化 村田 和子 (@kazuno_ko85)
自己紹介 村田 和子 (@kazuno_ko85) デジタルサーカス株式会社 所属 Drupal
は2015年1月~ Drupal Meetup Tokyo の運営スタッフです。 https://drupal-tokyo.connpass.com/ Drupal Camp DEN Japan 2018 のスタッフやります。 https://drupal-meetup-den.connpass.com/event/100818/
このスライドは・・・ 2018年10月ごろの資料です。 スライドの終盤の内容は日々変わる状況が変わっているので、最新情報は Drupal.orgへ!
Drupalの多言語化 Drupalと言えば多言語化サイトを作るのが簡 単!とよく言われます。 Drupal8の多言語化サイトはコアのモジュー ルを有効化するだけで設定可能です。 今日のLTはコンテンツの多言語化で困った問 題に突き当たったので共有します。
コンテンツのDBテーブル 概念 本文 <div class=‘XXXX’> ◦◦ ◦◦ ◦◦ ◦◦ ◦◦
</div> タイトル カテゴリ タイトルXXXXXXXX XXX ▪▪ フィールド値は基本的に別テーブルで保存さ れています。 node field_category field_title field_body ※簡易化図なので、実態はちょっと 違います。 タクソノミー 参照
コンテンツ 多言語化の構造 オリジナル コンテンツ [日本語] コンテンツ [英語] コンテンツ [ドイツ語] 本文
日本語の本文 nid value langcode 37 37 37 ja en de 日本語の本文… English body... Deutscher Körper... 実際はフィールド毎に 翻訳データを保持
フィールドの翻訳設定
フィールドの翻訳設定
Paragraphsモジュール パラグラフとは https://www.drupal.org/project/paragrap hs
Paragraphsとコンテンツの構造 node field_paragraph paragraph field_title field_body コンテンツとパラグラフはどちらもエンティ ティであり、参照で紐づく 参照
Paragraphsを多言語化 node field_paragraph paragraph 日本語 本家から設定 指示アリ https://www.drupal.org/docs/8/modules/ paragraphs/multilingual-paragraphs- configuration
参照先のエンティ ティのフィールド を 多言語推奨 paragraph 英語 paragraph ドイツ語 参照 ここは言語共通
追加でContent Moderation追加 https://www.drupal.org/docs/8/core/mod ules/content-moderation/overview
ここで困った 赤枠の部分がデフォルトチェック & 変更不可 となる 翻訳コンテンツ編集時にパラグラフの入力欄 が表示されない。
解決方法は・・・ Paragraphs asymmetric translation widgets を使う https://www.drupal.org/project/paragrap hs_asymmetric_translation_widgets
Paragraphs asymmetric translation field_paragraph paragraph 日本語 paragraph 英語 paragraph ドイツ語
参照 ここを翻訳 オリジナル コンテンツ [日本語] コンテンツ [英語] コンテンツ [ドイツ語] field_paragraph field_paragraph 参照 参照
パッチ + Paragraphs EXPERIMENTALウィ ジェット paragraphs 1.3 + 最新のパッチでは動かない。 (パッチを当てられない)
https://www.drupal.org/project/paragrap hs/issues/2904705#comment-12814932
ありがとうございました