# Font Stacks Per Language With :lang()

> Switches to fonts that cover the script of the page or block language, for example Arabic, Hebrew, Japanese, Chinese, Korean, Thai and Hindi, while keeping your theme font for Latin text.

- Type: CSS
- Runs: Site-wide header
- Category: [Multilingual](https://wpide.com/library/category/multilingual/)
- Tags: fonts, typography, css
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/i18n-lang-font-stacks/

## Code

```css
:lang(ar), :lang(fa), :lang(ur) {
    font-family: "Noto Naskh Arabic", "Geeza Pro", Tahoma, "Segoe UI", sans-serif;
    line-height: 1.8;
}

:lang(he) {
    font-family: "Noto Sans Hebrew", Arial, "Segoe UI", sans-serif;
}

:lang(ja) {
    font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
    line-break: strict;
}

:lang(zh), :lang(zh-CN) {
    font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

:lang(zh-TW), :lang(zh-HK) {
    font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

:lang(ko) {
    font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
    word-break: keep-all;
}

:lang(th) {
    font-family: "Noto Sans Thai", Thonburi, Tahoma, sans-serif;
    line-height: 1.8;
}

:lang(hi), :lang(mr), :lang(ne) {
    font-family: "Noto Sans Devanagari", "Kohinoor Devanagari", Mangal, sans-serif;
}
```

## Notes

These use fonts already installed on most devices; swap in web fonts you load if you prefer.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Font Stacks Per Language With :lang()" in its snippet library and add it in one click; or create a new CSS snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
