PHPackages                             momokoudai/flarum-ext-i18n-settings - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. momokoudai/flarum-ext-i18n-settings

ActiveFlarum-extension[Localization &amp; i18n](/categories/localization)

momokoudai/flarum-ext-i18n-settings
===================================

Flarum 后台设置内容国际化插件|Flarum Extension i18n Settings

00PHP

Since Apr 10Pushed 2mo agoCompare

[ Source](https://github.com/momokoudai/flarum-ext-i18n-settings)[ Packagist](https://packagist.org/packages/momokoudai/flarum-ext-i18n-settings)[ RSS](/packages/momokoudai-flarum-ext-i18n-settings/feed)WikiDiscussions main Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

[中文文档](README_zh.md)

Flarum Extension i18n Settings
==============================

[](#flarum-extension-i18n-settings)

> Add multilingual display support to selected Flarum core settings and extension fields that normally only support a single language input. For example, the `title` and `url` fields of the `fof/links` extension. The backend supports setting titles and links, but can only set one language, which does not support multi-language input. This extension provides front-end multi-language display support. By entering specific tags, you can support multi-language input.

---

English
-------

[](#english)

### Features

[](#features)

- ✅ Frontend-only replacement, admin values remain editable in raw form
- ✅ Supports Flarum core basics settings
- ✅ Supports selected third-party extensions
- ✅ Supports JSON format and legacy `中文|English` format
- ✅ Explicit target control via `Enabled Plugins`
- ✅ Empty target list disables replacement by default for better stability

### Supported targets

[](#supported-targets)

TargetScopeFields`flarum-core`Flarum core `/admin#/basics``forum_title`, `forum_description`, `welcome_title`, `welcome_message`, `custom_header`, `custom_footer``fof-links``fof/links``title`, `url``flarum-tags``flarum/tags``name`, `description`> Only targets listed in `Enabled Plugins` will be replaced.

### Installation

[](#installation)

```
composer require momokoudai/flarum-ext-i18n-settings
php flarum cache:clear
```

### Configuration

[](#configuration)

Open the extension settings in the Flarum admin panel.

#### 1. Filter Pattern

[](#1-filter-pattern)

Default:

```
$$$

```

This marker identifies content that should be processed for multilingual replacement.

#### 2. Enabled Plugins

[](#2-enabled-plugins)

Examples:

```
flarum-core

```

```
flarum-core, fof-links, flarum-tags

```

If left empty, **replacement is disabled by default**.

### Usage

[](#usage)

#### Recommended JSON format

[](#recommended-json-format)

```
$$${"zh-Hans":"简体中文","en":"English","ja":"日本語"}$$$

```

#### Legacy format

[](#legacy-format)

```
$$$中文|English$$$

```

### Examples

[](#examples)

#### Forum title

[](#forum-title)

```
$$${"zh-Hans":"我的社区","en":"My Community"}$$$

```

#### Welcome banner

[](#welcome-banner)

```
$$${"zh-Hans":"欢迎来到社区","en":"Welcome to the community"}$$$

```

#### Custom header / footer with HTML

[](#custom-header--footer-with-html)

```
$$${"zh-Hans":"中文公告","en":"English Notice"}$$$

```

> For HTML content, prefer single quotes inside attributes to keep JSON easier to write.

### Behavior and safety

[](#behavior-and-safety)

- Replacement runs only on the **forum frontend**
- Admin forms keep the original marker content for editing
- User-generated discussions, posts, and replies are **not** replaced
- Unsupported extensions are not modified unless explicit compatibility is added

### Compatibility

[](#compatibility)

- Flarum `^1.8`

### Notes

[](#notes)

This extension is designed as a **targeted compatibility layer**, not a site-wide text replacement engine.

If you need support for another extension with admin-managed text fields, it can be added through a dedicated adapter.

---

中文说明
----

[](#中文说明)

### 功能特点

[](#功能特点)

- ✅ 仅在前台进行替换，后台仍保留原始标记内容，方便编辑
- ✅ 支持 Flarum 核心基础设置
- ✅ 支持部分第三方扩展字段
- ✅ 支持 JSON 格式和旧版 `中文|English` 格式
- ✅ 可通过 `Enabled Plugins` 精确控制生效目标
- ✅ 为提高稳定性，目标列表留空时默认不启用替换

### 已支持目标

[](#已支持目标)

目标范围字段`flarum-core`Flarum 核心 `/admin#/basics``forum_title`、`forum_description`、`welcome_title`、`welcome_message`、`custom_header`、`custom_footer``fof-links``fof/links``title`、`url``flarum-tags``flarum/tags``name`、`description`> 只有在 `Enabled Plugins` 中明确填写的目标才会被替换。

### 安装

[](#安装)

```
composer require momokoudai/flarum-ext-i18n-settings
php flarum cache:clear
```

### 配置

[](#配置)

在 Flarum 后台扩展设置中进行配置。

#### 1. 过滤标记（Filter Pattern）

[](#1-过滤标记filter-pattern)

默认值：

```
$$$

```

该标记用于识别需要进行多语言替换的内容。

#### 2. 启用的目标（Enabled Plugins）

[](#2-启用的目标enabled-plugins)

示例：

```
flarum-core

```

```
flarum-core, fof-links, flarum-tags

```

如果留空，**默认不启用替换**。

### 使用方式

[](#使用方式)

#### 推荐 JSON 格式

[](#推荐-json-格式)

```
$$${"zh-Hans":"简体中文","en":"English","ja":"日本語"}$$$

```

#### 旧版兼容格式

[](#旧版兼容格式)

``text $$$中文|English$$$

```

### 示例

#### 论坛标题

```text
$$${"zh-Hans":"我的社区","en":"My Community"}$$$

```

#### Welcome Banner

[](#welcome-banner-1)

```
$$${"zh-Hans":"欢迎来到社区","en":"Welcome to the community"}$$$

```

#### 带 HTML 的 custom header / footer

[](#带-html-的-custom-header--footer)

```
$$${"zh-Hans":"中文公告","en":"English Notice"}$$$

```

> 对于 HTML 内容，建议属性值里优先使用单引号，便于书写 JSON。

### 行为与安全性

[](#行为与安全性)

- 只在**论坛前台**进行替换
- 后台表单仍显示原始标记内容，方便继续编辑
- 不会替换用户发布的主题、帖子和回复
- 未适配的扩展不会被自动修改，除非后续添加专门兼容代码

### 兼容性

[](#兼容性)

- Flarum `^1.8`

### 说明

[](#说明)

本扩展的定位是 **“定点兼容层”**，而不是全站字符串自动翻译引擎。

如果你还希望支持其它带后台文本设置的扩展，可以继续按适配器方式扩展。

---

License
-------

[](#license)

MIT

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance56

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e97009a1fe527fab72500fadc4bc78112051b7882fa99710f0dc58fbc71c5fe?d=identicon)[momokoudai](/maintainers/momokoudai)

---

Top Contributors

[![momokoudai](https://avatars.githubusercontent.com/u/33850943?v=4)](https://github.com/momokoudai "momokoudai (8 commits)")

### Embed Badge

![Health badge](/badges/momokoudai-flarum-ext-i18n-settings/health.svg)

```
[![Health](https://phpackages.com/badges/momokoudai-flarum-ext-i18n-settings/health.svg)](https://phpackages.com/packages/momokoudai-flarum-ext-i18n-settings)
```

###  Alternatives

[smmoosavi/php-gettext

Wrapper for php-gettext by danilo segan. This library provides PHP functions to read MO files even when gettext is not compiled in or when appropriate locale is not present on the system.

1926.6k1](/packages/smmoosavi-php-gettext)[laradevs/spanish

labels translated to spanish

166.7k](/packages/laradevs-spanish)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
