Title: Lang Attribute for the Block Editor
Author: Jb Audras
Published: <strong>2022 年 11 月 23 日</strong>
Last modified: 2025 年 11 月 27 日

---

搜尋外掛

![](https://ps.w.org/lang-attribute/assets/banner-772x250.png?rev=2826998)

![](https://ps.w.org/lang-attribute/assets/icon-256x256.png?rev=2826998)

# Lang Attribute for the Block Editor

 由 [Jb Audras](https://profiles.wordpress.org/audrasjb/) 開發

[下載](https://downloads.wordpress.org/plugin/lang-attribute.0.3.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/lang-attribute/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/lang-attribute/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/lang-attribute/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/lang-attribute/#developers)

 [技術支援](https://wordpress.org/support/plugin/lang-attribute/)

## 外掛說明

**免責聲明：這個外掛已整合至 WordPress 核心程式，不再需要獨立安裝。這個外掛計畫於
2026 年年底從外掛目錄移除。**

The intent of this plugin is to provide a way to ensure any language change in the
content of a page is indicated to assistive technologies. This feature is not available
by default in the block editor so it is difficult to make a website fully compliant
to WCAG guidelines using the block editor for now.

We clearly hope this feature will be natively implemented in the block editor in
middle term, because this very simple feature is really needed to help people to
create accessible websites. But in short terms, we need a solution and this plugin
is a solution you may want to use to make your website compliant to accessibility
guidelines 🙂

For more context: this plugin helps you to make your website compliant to the Web
Content Accessibility Guidelines (WCAG) success criterion 3.1.2: “Language of Parts”.
The purpose of this success Criterion is to ensure that user agents can correctly
present content written in multiple languages.

As per Web Content Accessibility Guidelines:

This makes it possible for user agents and assistive technologies to present content
according to the presentation and pronunciation rules for that language. This applies
to graphical browsers as well as screen readers, braille displays, and other voice
browsers.

Both assistive technologies and conventional user agents can render text more accurately
if the language of each passage of text is identified. Screen readers can use the
pronunciation rules of the language of the text. Visual browsers can display characters
and scripts in appropriate ways.

This is especially important when switching between languages that read from left
to right and languages that read from right to left, or when text is rendered in
a language that uses a different alphabet. Users with disabilities who know all 
the languages used in the Web page will be better able to understand the content
when each passage is rendered appropriately.

## 螢幕擷圖

 * [[
 * 使用區塊編輯器的文字格式化工具列新增 lang 屬性
 * [[
 * Checking that the `lang` attribute is rendered on front-end.

## 安裝方式

 1. 安裝並啟用外掛。
 2. Use the “Language attribute” toolbar button, available on any text content added
    in the block editor.

## 使用者評論

![](https://secure.gravatar.com/avatar/472a86474e545a91a39adf3eb59321da2de15c424e93e87ca22f7024a75bacd1?
s=60&d=retro&r=g)

### 󠀁[Thanks!](https://wordpress.org/support/topic/thanks-2470/)󠁿

 [Yaser Shahi](https://profiles.wordpress.org/yasser1992/) 2024 年 2 月 22 日

As a user of WordPress with a Persian background, I am genuinely grateful to the
developers for offering such a valuable solution.

![](https://secure.gravatar.com/avatar/5c8bfb0c31391fecdc5b25eb92f59ec053f65e472d16a00d1bf9d280539a8d94?
s=60&d=retro&r=g)

### 󠀁[Thank you for supporting accessibility!](https://wordpress.org/support/topic/thank-you-for-supporting-accessibility/)󠁿

 [ovau](https://profiles.wordpress.org/ovau/) 2023 年 2 月 2 日

Thanks for this little Plugin! Seems it just adds a <span>-tag to the block. This
can also be done with the html-mode of the block-editor. But so it might be a little
bit easier to maintain.

![](https://secure.gravatar.com/avatar/3a0d4408354ac7f1fddc273366daae9126187a427e91b7798e3502d2ba499b4d?
s=60&d=retro&r=g)

### 󠀁[Such a loving life saver for accessibility!](https://wordpress.org/support/topic/such-a-loving-life-saver-for-accessibility/)󠁿

 [Anne-Mieke Bovelett](https://profiles.wordpress.org/annebovelett/) 2023 年 11 
月 21 日

Thank you, thank you, thank you!, for creating and sharing this plugin. As small
as this may seem to the less knowledgable, this plugin provides a massive win for
accessibility! Update Tuesday, Nov. 21: this plugin still works fine with WordPress
6.4.x! An yes, of course, you can achieve the in the HTML editor manually, but not
all users are comfortable doing that. This is a great solution!

 [ 閱讀全部 3 則使用者評論 ](https://wordpress.org/support/plugin/lang-attribute/reviews/)

## 參與者及開發者

以下人員參與了開源軟體〈Lang Attribute for the Block Editor〉的開發相關工作。

參與者

 *   [ Jb Audras ](https://profiles.wordpress.org/audrasjb/)
 *   [ Guillaume TURPIN ](https://profiles.wordpress.org/guillaumeturpin/)
 *   [ Whodunit ](https://profiles.wordpress.org/whodunitagency/)

〈Lang Attribute for the Block Editor〉外掛目前已有 9 個本地化語言版本。 感謝[全部譯者](https://translate.wordpress.org/projects/wp-plugins/lang-attribute/contributors)
為這個外掛做出的貢獻。

[將〈Lang Attribute for the Block Editor〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/lang-attribute)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/lang-attribute/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/lang-attribute/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/lang-attribute/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/lang-attribute/)。

## 變更記錄

#### 0.3

 * Added support for the `dir` attribute.

#### 0.2.2

 * Further internationalization fixes.

#### 0.2.1

 * Adds `wp_set_script_translations` to the main script.

#### 0.2

 * Fixes an i18n issue: JS strings were not translatable.

#### 0.1

 * Plugin initial commit. Works fine 🙂

## 中繼資料

 *  版本 **0.3**
 *  最後更新 **4 個月前**
 *  啟用安裝數 **100+**
 *  WordPress 版本需求 ** 5.9 或更新版本 **
 *  已測試相容的 WordPress 版本 **6.9.4**
 *  PHP 版本需求 ** 7.0 或更新版本 **
 *  語言
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/lang-attribute/)、[Dutch](https://nl.wordpress.org/plugins/lang-attribute/)、
   [English (US)](https://wordpress.org/plugins/lang-attribute/)、[French (France)](https://fr.wordpress.org/plugins/lang-attribute/)、
   [Italian](https://it.wordpress.org/plugins/lang-attribute/)、[Norwegian (Bokmål)](https://nb.wordpress.org/plugins/lang-attribute/)、
   [Persian](https://fa.wordpress.org/plugins/lang-attribute/)、[Portuguese (Portugal)](https://pt.wordpress.org/plugins/lang-attribute/)、
   [Spanish (Chile)](https://cl.wordpress.org/plugins/lang-attribute/)、及 [Spanish (Spain)](https://es.wordpress.org/plugins/lang-attribute/).
 *  [將這個外掛本地化為你的母語版本](https://translate.wordpress.org/projects/wp-plugins/lang-attribute)
 * 標籤
 * [accessibility](https://tw.wordpress.org/plugins/tags/accessibility/)[block-editor](https://tw.wordpress.org/plugins/tags/block-editor/)
   [lang](https://tw.wordpress.org/plugins/tags/lang/)[language](https://tw.wordpress.org/plugins/tags/language/)
 *  [進階檢視](https://tw.wordpress.org/plugins/lang-attribute/advanced/)

## 評分

 4.7 星，滿分為 5 星

 *  [  2 個 5 星使用者評論     ](https://wordpress.org/support/plugin/lang-attribute/reviews/?filter=5)
 *  [  1 個 4 星使用者評論     ](https://wordpress.org/support/plugin/lang-attribute/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/lang-attribute/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/lang-attribute/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/lang-attribute/reviews/?filter=1)

[新增使用者評論](https://wordpress.org/support/plugin/lang-attribute/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/lang-attribute/reviews/)

## 參與者

 *   [ Jb Audras ](https://profiles.wordpress.org/audrasjb/)
 *   [ Guillaume TURPIN ](https://profiles.wordpress.org/guillaumeturpin/)
 *   [ Whodunit ](https://profiles.wordpress.org/whodunitagency/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/lang-attribute/)