doggy8088

OpenCC for Swift:內建完整字典、locale preset、自訂轉換器與 XML-compatible HTML 轉換的 SwiftPM 實作。

12
2
100% credibility
Found May 04, 2026 at 12 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Swift
AI Summary

A library that converts Chinese text between regional variants like Simplified Chinese to Traditional Chinese for Taiwan, Hong Kong, or Japan, with custom dictionary and HTML support.

How It Works

1
🔍 Discover the converter

You learn about a simple tool that changes Chinese text from one regional style to another, like Simplified to Traditional.

2
🚀 Try ready examples

You start using one of the built-in examples to see text conversion in action immediately.

3
🎯 Pick styles

Choose the starting style such as mainland China and the target style like Taiwan or Hong Kong.

4
Transform your text

Paste or type your Chinese words and phrases, then see them switch to the perfect new style.

5
🔧 Customize words

Add your own special word replacements to make the conversion fit exactly what you need.

6
🌐 Convert web content

For pages or documents with formatting, change only the text while keeping everything else in place.

Text ready to use

Your Chinese text now matches any style or format, making it easy to share with the right audience.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 12 to 12 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is opencc-swift?

OpenCC-Swift is a SwiftPM library that reimplements OpenCC—a staple for converting Chinese text between Simplified (cn), Traditional (tw, tw2, hk), and other variants like jp—directly in native Swift. It ships with full built-in dictionaries, locale presets for quick setup, and custom converters you define via strings or entry pairs. Developers get seamless text swapping in apps, plus XML-compatible HTML conversion that respects lang tags, skips scripts/styles, and preserves markup.

Why is it gaining traction?

Unlike bridging the original C++ OpenCC or its Python reimplementations on GitHub, this pure Swift version integrates effortlessly via SwiftPM with zero external deps, ideal for iOS/macOS speed. The hook is dead-simple APIs: grab a preset converter like cn-to-tw2, build customs on the fly, or process HTML/XML without regex hacks—output stays tidy and locale-aware. Early adopters praise the examples for instant prototyping.

Who should use this?

iOS/macOS devs localizing Chinese content in apps, like news readers flipping cn-to-tw articles on-device. SwiftUI teams handling user-generated zh-HK text to zh-CN. WebView wrappers in Swift apps converting dynamic HTML feeds without server roundtrips.

Verdict

At 12 stars and 1.0% credibility, it's immature—sparse tests, basic docs—but the working examples and clean API make it a low-risk experiment for prototypes. Hold for production until more eyes stabilize it.

(178 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.