Upload
yoav-farhi
View
681
Download
2
Embed Size (px)
Citation preview
Right To Left Languages In WordPress
Yoav Farhi @yoavf
תמיכה בשפות הנכתבות מימין-לשמאל בוורדפרס
יואב פרחי @yoavf
Right To Left Languages In WordPress
العربية Arabicערבית
پنجابی Punjabi פנג'אבי
اردو Urdu אורדו
فارسی Farsi פרסית
پښتو Pashto פשטו
Languagesשפות
Hebrew עברית
سۆرانیSorani
(Kurdish)
סוראני (כורדית)
ދވހMaldivian
(dhivehi)
מלדיבית(דיבהי)
ئۇيغۇر تىلى Uyghur+ אויגור
العربية Arabicערבית
پنجابی Punjabi פנג'אבי
اردو Urdu אורדו
فارسی Farsi פרסית
پښتو Pashto פשטו
Languagesשפות
Hebrew עברית
سۆرانیSorani
(Kurdish)
סוראני (כורדית)
ދވހMaldivian
(dhivehi)
מלדיבית(דיבהי)
ئۇيغۇر تىلى Uyghur+ אויגור
العربية Arabicערבית
پنجابی Punjabi פנג'אבי
اردو Urdu אורדו
فارسی Farsi פרסית
پښتو Pashto פשטו
Languagesשפות
Hebrew עברית
سۆرانیSorani
(Kurdish)
סוראני (כורדית)
ދވހMaldivian
(dhivehi)
מלדיבית(דיבהי)
ئۇيغۇر تىلى Uyghur+ אויגור
הבעיה עם קובץ rtl.css
קובץ נוסף לטעינה בכל צפיה ⬅באתר
קשה יותר ליצירה באופן אוטומטי ⬅פתרון חלקי בלבד במקרים בהם ⬅
ה-CSS מודולרי
➡ Another file to request on every page view
➡ Harder to generate automatically
➡ Only a partial solution when using modular css
The problem with rtl.css
האלטרטיבה
צרו קובץ מראה מקובץ המקור ⬅ {file}.css
⬅{file}-rtl.css קראו לו
➡ Generate a fully mirrored file out of the original {file}.css
➡ Name it {file}-rtl.css
The Alternative
The Alternativeהאלטרטיבה
1. wp_register_style( 'file-handle', 'file.css' );2. wp_style_add_data( 'file-handle', );
The Alternativeהאלטרטיבה
1. wp_register_style( 'file-handle', 'file.css' );2. wp_style_add_data( 'file-handle', 'rtl', 'replace' );
מה זה עושה
טוען אוטומטית קובץ עם סיומת rtl.css- במקום
הקובץ המקורי.
Loads the file with the -rtl.css suffix instead
of the original file.
What this does
יצירת קובץ המראה
עקבו אחר הנעשה בקוד הליבה של ⬅וורדפרס
⬅ rtlcss השתמשו במודול נודבתהליך ההרכבה שלכם.
npm install rtlcss -g
➡ Follow core WordPress’ lead ➡ Integrate node module rtlcss
in your build process
npm install rtlcss -g
Generating the mirrored file
rtlcss(המודול ל-Node, לא הקובץ)
קוד מראה מושלם ⬅אפשרויות ופקדים מתקדמים ⬅
,(ignore, remove, replace)ותוספים
שילובים במערכות הרכבה ⬅ grunt, gulp,) נפוצות
.(…webpack
➡ Perfect mirroring ➡ Advanced options and
directives (ignore, remove, replace), and plugins
➡ Integrations with popular build systems (grunt, gulp, webpack…).
rtlcss (The Node module, not the file)
rtlcssשימושים מתקדמים
rtlcss advanced uses
.rotate { transform: rotate(45deg) /*rtl:append:scaleX(-1)*/;}