定制 fof/discussion-language 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fof/discussion-language

Composer 安装命令:

composer require fof/discussion-language

包简介

Specify the language a discussion is written in & sort by language

关键字:

README 文档

README

License Latest Stable Version OpenCollective Donate

image

A Flarum extension. Tag discussions with the language they are written in, filter the discussion list by language, and optionally auto-detect a visitor's preferred language to show relevant content by default.

Features

  • Language tagging — Assign a language (with optional country flag) to each discussion. Authors are prompted to choose a language when composing, moderators can change it at any time.
  • Discussion list filtering — A language dropdown appears on the index page. Discussions are filtered by language automatically based on the visitor's browser locale, cookie, or user preference — or they can manually pick "Any Language".
  • Search gambit — Filter search results by language using language:<code> in the search bar.
  • Composer pre-selection — Optionally pre-fill the language picker in the composer with the user's current Flarum locale.
  • Country flags — Display emoji flags alongside language names (backed by twemoji). Uses ISO 639-2 language codes and country data.
  • Native language names — Optionally display language names in their own script (e.g. "Deutsch" instead of "German").
  • Tags page integration — Optionally show only the most recent discussion in the user's locale on the tags page instead of the overall most recent discussion.
  • fof/follow-tags integration — When fof/follow-tags is enabled, users can choose which discussion language they want to receive tag subscription notifications for.

Installation

composer require fof/discussion-language:"*"

Updating

composer update fof/discussion-language
php flarum assets:publish
php flarum migrate

Configuration

All settings are available under the extension's admin page:

Setting Description Default
Use native language names Show language names in their own script Off
Show country flags Display emoji flags next to language names On
Pre-select current locale in composer Automatically pick the user's Flarum locale when starting a discussion Off
Use detected language for default filter Redirect visitors to their detected language on page load Off
Show "Any Language" option Add an option to the dropdown to view all discussions regardless of language On
Only show locale discussions on tags page Replace the tag's last discussion link with the most recent one in the user's locale Off

Languages and their associated countries (for flag display) are managed from the Languages section of the extension's admin page.

Permissions

  • Allow language editing — Controls which user groups can change the language of their own discussions, and for how long after posting (immediately, within 10 minutes, or until someone else replies).
  • Allow moderate language editing — Controls which groups can change the language on any discussion at any time.

Links

OpenCollective GitHub

An extension by FriendsOfFlarum, commissioned by mailcow.

fof/discussion-language 适用场景与选型建议

fof/discussion-language 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 34.44k 次下载、GitHub Stars 达 10, 最近一次更新时间为 2020 年 04 月 13 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「flarum」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 fof/discussion-language 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 fof/discussion-language 我们能提供哪些服务?
定制开发 / 二次开发

基于 fof/discussion-language 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 34.44k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 8
  • 依赖项目数: 3
  • 推荐数: 5

GitHub 信息

  • Stars: 10
  • Watchers: 3
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-04-13