没有不值得去解决的问题,也没有不值得去学习的技术!

After Pausing OpenAI, I Tested Gemini Locally: A WordPress Translation Comparison With GLM 5.2

【图3:Gemini 3.5 Flash 首次成功调用结果】

作者:

,

Previously, I made several rounds of adjustments to the SlyTranslate workflow for translating Chinese WordPress technical articles into English.

The current production setup is:

  • SlyTranslate
  • Zhipu GLM 5.2
  • Custom MU plugin
  • Gutenberg block and code content placeholder protection
  • Separate API calls for title, summary, and body
  • Translating the body as a whole document whenever possible, rather than splitting it into many small segments

In the previous round of testing, DeepSeek’s overall translation quality did not surpass GLM 5.2, so I temporarily stopped exploring the DeepSeek direction.

I originally planned to test OpenAI next, but upon actual operation, I found that the OpenAI API and ChatGPT Plus are two independent billing systems. The third-party subscription platform I currently use, WildAI, also explicitly replied that it does not support OpenAI API top-ups, and the Codex Credit on the page cannot be used as general OpenAI API quota.

Therefore, I temporarily suspended OpenAI testing and switched to testing Google Gemini, which is also supported in the SlyTranslate Connector list.

This article documents this local Gemini API test, the translation quality comparison with GLM 5.2, and why I ultimately retained GLM 5.2 as the current production solution.

[Figure 1: WildAI customer service confirming OpenAI API is not supported]
[Figure 1: WildAI customer service confirming OpenAI API is not supported]

1. Why test Gemini locally first

My WordPress production server is located on Alibaba Cloud in Hangzhou.

When testing Google-related APIs on the server previously, I already encountered network connection issues. Therefore, even if Gemini’s translation quality is higher, I cannot simply assume it is suitable as a production solution.

This round of testing only answers three questions:

  1. Is Gemini’s English translation quality significantly better than GLM 5.2?
  2. Can Gemini reliably preserve Gutenberg blocks, HTML, domains, and technical terminology?
  3. Are its API call speed and success rate suitable for long article translation?

Only if the first three points show significant improvement is it worth further investigating the network and deployment issues on the Hangzhou server.

To avoid complicating the test from the start, I did not install the Google Connector or jump directly into SlyTranslate. Instead, I called the Gemini API via a local script first.

2. Creating a Gemini API Key

I created a Gemini API Key in Google AI Studio.

The current project uses the free tier, so there is no need to bind a paid account first.

[Figure 2: Google AI Studio API Key page]
[Figure 2: Google AI Studio API Key page]

After creating it, I first called the model list API to confirm which models supporting generateContent are visible to the current project.

The models returned locally include:

Plaintext
gemini-2.5-flash
gemini-2.5-pro
gemini-3-flash-preview
gemini-3-pro-preview
gemini-3.1-flash-lite
gemini-3.1-pro-preview
gemini-3.5-flash
gemini-flash-latest
gemini-pro-latest

However, subsequent testing proved that:

A model appearing in the models.list response does not necessarily mean the current project has actual call quota for it.

The model list only serves as a candidate pool; ultimately, it still needs to be confirmed through an actual generateContent request.

3. First call to Gemini 3.5 Flash

For the first round, I chose:

Plaintext
gemini-3.5-flash

The first request returned:

Plaintext
UNAVAILABLE
This model is currently experiencing high demand.

This indicates that the API Key and local network are basically fine, but the model capacity was insufficient at that time.

Afterwards, I tried:

Plaintext
gemini-2.5-flash

Although it still appears in the model list, the actual request returned:

Plaintext
NOT_FOUND

This model models/gemini-2.5-flash is no longer available to new users.
Please update your code to use a newer model.

Therefore, this project cannot continue to use Gemini 2.5 Flash.

After calling Gemini 3.5 Flash again, the request finally succeeded, yielding the following translation:

In a multi-domain WordPress environment, even if the database has been updated, Redis Object Cache may still return stale objects. Therefore, you first need to confirm whether the cache keys are isolated by Host.

The technical meaning and English expression of this translation have no obvious issues.

[Figure 3: First successful call result for Gemini 3.5 Flash]
[Figure 3: First successful call result for Gemini 3.5 Flash]

4. An easily overlooked curl retry issue

During the testing process, I also encountered an issue unrelated to Gemini itself.

Initially, I used:

Bash
curl --retry 4

When a request fails multiple times before succeeding, curl might output the previous failed responses and the final successful response consecutively.

The actual content saved in the variable might look like:

JSON
{"error": {"code": 503}}
{"error": {"code": 503}}
{"candidates": [...]}

This is not a valid single JSON document, so Python will throw an error when parsing it:

Plaintext
Extra data

The solution is to add the following in curl:

Bash
--fail

For example:

Bash
curl -sS \
  --fail \
  --retry 4 \
  --retry-delay 8 \
  ...

This way, HTTP error responses will not be written to standard output, and only the final successful JSON will be kept in the variable.

This detail is worth noting for future tests involving other APIs that support retries.

5. Setting up an A/B test under identical conditions

After confirming that the Gemini API could be called, I did not redesign a set of test materials. Instead, I directly reused the test inputs from the previous comparison between GLM 5.2 and DeepSeek.

The test content included:

  • Title
  • Summary
  • Body excerpt

Both sets of models used the exact same:

  • Chinese source text
  • Translation prompt
  • Field order
  • Maximum output token limit
  • Non-streaming request

The model parameters were respectively:

GLM 5.2

Plaintext
do_sample=false
thinking={"type":"disabled"}

Gemini 3.5 Flash

Plaintext
temperature=0
thinkingLevel=minimal

It should be noted that the parameters from the two vendors cannot be mapped exactly one-to-one.

GLM 5.2 can explicitly disable thinking, whereas Gemini’s minimal can only be understood as minimizing thinking overhead, and cannot simply be treated as the exact same mode.

6. Test results for GLM 5.2 vs. Gemini 3.5 Flash

The results of this round of testing are as follows:

FieldGLM 5.2Gemini 3.5 Flash
Title2.10 seconds, 1 success24.97 seconds, 2 successes
Summary4.24 seconds, 1 success57.68 seconds, 2 successes
Body9.11 seconds, 1 success7.17 seconds, 1 success

All three GLM fields succeeded on the first request.

Gemini’s body speed was faster than GLM’s, but the title and summary failed on the first request and only succeeded after a retry.

This shows that Gemini is not simply “slower.”

Its main issue is significant fluctuation in call times:

  • Sometimes the body request is very fast;
  • Sometimes even a short title requires waiting over twenty seconds;
  • The summary request took nearly a minute.

For occasional manual calls, this fluctuation might be acceptable.

However, when translating a long article in SlyTranslate, the title, summary, body, and other fields may require multiple consecutive requests. If any single request encounters insufficient capacity, it can lead to a timeout or interrupt the entire translation.

7. Title comparison

The title returned by GLM 5.2 is:

WordPress Polylang: Fixing Links That Still Point to the Chinese Site After English Subdomain Migration — Category Dropdown, Breadcrumbs, and Block Templates

Gemini 3.5 Flash returned:

How to Fix WordPress Polylang Links Still Pointing to the Chinese Site After Migrating to an English Subdomain: Resolving Category Dropdowns, Breadcrumbs, and Block Templates

Gemini’s title is closer to the common style of English tutorial articles, using:

Plaintext
How to Fix...

It reads more naturally overall.

However, it is also noticeably longer:

  • GLM: 157 characters
  • Gemini: 174 characters

For search result titles and WordPress article titles, Gemini’s version is slightly too verbose.

GLM’s version is more compact and closer to the restrained, direct style consistent with my personal technical blog.

8. Summary comparison

Gemini’s summary used:

This article documents the troubleshooting and resolution of an issue…

This kind of expression is quite natural in English technical articles, and the overall organization is slightly smoother than GLM’s.

However, Gemini also tends to expand the text:

  • GLM summary: 665 characters
  • Gemini summary: 721 characters

Gemini’s English naturalness is slightly better, but it adjusts the originally direct Chinese technical explanations to be more formal.

This approach is not necessarily wrong, but it can easily make a personal blog look more like uniformly packaged technical documentation.

My current goal is not to pursue the most formal English, but rather to approximate a manual re-translation as closely as possible while maintaining technical accuracy and preserving the authentic feel of a personal blog.

From this perspective, GLM’s style is actually closer to the current requirements.

9. Differences in technical accuracy within the body

In the body, Gemini wrote:

the browser did not load the English category page, but instead redirected to:

Here it used:

Plaintext
redirected to

But the Chinese source text only described the browser going to the wrong address; it did not confirm that a 301 or 302 redirect occurred on the server side.

In technical articles, redirected often carries a fairly specific HTTP redirect meaning.

GLM used:

went to

Or:

did not visit the English category page

Although the expression is not as polished as Gemini’s, it does not make additional inferences about the specific redirect mechanism.

These differences may seem small, but they are a crucial point in technical translation:

Naturalness cannot come at the expense of technical boundaries.

10. Gemini left residual Chinese headings

The most obvious issue in this round of testing was not speed, but structural content integrity.

In the body returned by Gemini, the level 2 headings were still in Chinese:

HTML
<!-- wp:heading -->
<h2 class="wp-block-heading">一、当前多域名结构</h2>
<!-- /wp:heading -->

GLM 5.2 translated them normally as:

HTML
<!-- wp:heading -->
<h2 class="wp-block-heading">1. Current Multi-Domain Structure</h2>
<!-- /wp:heading -->

Gemini correctly preserved:

  • Gutenberg comments
  • HTML tags
  • class attributes
  • Block order

But the natural language in the headings was not translated.

This is a classic case of “structural preservation succeeded, but content translation was missed.”

For a casual chat translation, this might only be a minor issue.

But for SlyTranslate’s automated production workflow, residual Chinese in the body means the article cannot be published directly and still requires manual paragraph-by-paragraph review.

Yet the core goal of optimizing the automated translation workflow right now is precisely to minimize this manual review cost.

11. Continuing the test with Gemini 3.1 Pro Preview

Considering that Flash is more oriented towards speed and cost, I also tried the higher-quality:

Plaintext
gemini-3.1-pro-preview

The test still used the exact same title, summary, and body inputs as GLM 5.2.

As a result, all three fields failed:

FieldHTTPAttemptsFinal translation
Title4295None
Summary4295None
Body4295None

Therefore, this round did not yield any Gemini Pro translations that could be used for a quality comparison.

12. 429 is not a standard request rate limit

After further inspecting the raw error returned by Gemini, the reason was very clear:

Plaintext
Quota exceeded for metric:
generativelanguage.googleapis.com/generate_content_free_tier_input_token_count

limit: 0
model: gemini-3.1-pro

At the same time, the request count quota was also:

Plaintext
limit: 0
model: gemini-3.1-pro

This means:

The current free tier has a quota of 0 for both request count and input tokens for Gemini 3.1 Pro Preview.

Although the error response suggests retrying later, waiting tens of seconds or repeatedly retrying is meaningless when the quota itself is 0.

Only after enabling Google Cloud paid billing would it be possible to continue testing Gemini 3.1 Pro Preview.

13. Why I did not continue with Google paid testing

From a purely model evaluation perspective, continuing to test Gemini Pro is certainly valuable.

But the current goal is not to collect as many model results as possible, but to establish a stable, simple, and long-term sustainable WordPress translation workflow.

Several practical issues currently exist:

  1. Gemini 3.5 Flash’s naturalness is slightly better, but the gap is not significant;
  2. Gemini left residual Chinese headings;
  3. API request stability is weaker than GLM 5.2;
  4. Gemini Pro requires enabling paid billing first;
  5. The production server is located on Alibaba Cloud in Hangzhou, and accessing Google APIs still poses network issues;
  6. Even if the local test quality is higher, subsequent deployment would still require increased network and operational complexity.

To test a model that has not yet proven to significantly improve quality, prematurely introducing payment, network proxies, and production server modifications means the investment does not match the return.

Therefore, this round did not proceed with enabling Google paid services, nor did it install the Google Connector.

14. Final conclusion for the current stage

Based on this round of testing, the following conclusions can be drawn.

Gemini 3.5 Flash

Pros:

  • English expression is slightly more natural;
  • Title and summary are closer to common English technical article styles;
  • Single body request speed is sometimes very fast;
  • Gutenberg and main HTML structure are mostly preserved.

Issues:

  • Retries occurred for both title and summary requests;
  • Response time fluctuates noticeably;
  • Tends to slightly expand on the source text;
  • May broaden the technical meaning of the source text when using words like redirected;
  • Untranslated Chinese headings appeared in the body.

Gemini 3.1 Pro Preview

The current free tier quota is 0, making it impossible to obtain any translations, so the actual translation quality cannot be judged for now.

GLM 5.2

GLM’s English may not be more natural than Gemini’s in every single sentence, but its overall performance is more balanced:

  • More cautious with technical boundaries;
  • More restrained style;
  • More stable Gutenberg structure preservation;
  • All three fields yielded complete translations in this round;
  • Stable speed for most requests;
  • Already capable of running in the current SlyTranslate and custom MU plugin workflow;
  • More suitable for deployment in the current Alibaba Cloud Hangzhou production environment.

15. Retaining GLM 5.2 for the current stage

After this round of testing, I did not integrate Gemini into SlyTranslate.

The current production solution continues to use:

Plaintext
SlyTranslate
+
GLM 5.2
+
Custom Gutenberg and code placeholder protection
+
Whole body translation

This does not mean that Gemini’s English capabilities are necessarily inferior to GLM’s.

More accurately:

Under the current constraints of a WordPress technical blog, an Alibaba Cloud Hangzhou server, and low manual maintenance costs, Gemini has not yet demonstrated a sufficiently clear overall advantage.

If the conditions for Google API payment, network access, and model quotas change in the future, Gemini Pro can still be retested.

But for the current stage, continuing to use the proven and stable GLM 5.2 is more appropriate than introducing more complexity for a theoretical marginal gain in naturalness.

Summary

The most important takeaway from this test is not simply judging which model has “better English.”

What really needs to be compared is:

  • Technical accuracy
  • English naturalness
  • Gutenberg structural integrity
  • Long article stability
  • Request speed
  • Failure retries
  • API costs
  • Server network
  • Subsequent maintenance costs

Gemini 3.5 Flash has a slight edge in some English expressions, but exhibited structural content omissions and request fluctuations.

Gemini 3.1 Pro Preview has no available quota at all under the free tier.

After comprehensive consideration, GLM 5.2 remains the more suitable choice for long-term production at present.

This round of Google testing can be paused for now.

系列导航

需要长期技术维护或远程问题排查?

我是拥有 15+ 年经验的 PHP / Go 后端工程师,长期关注已有系统维护、Bug 修复、性能优化、服务器排查、WordPress 网站维护和小功能迭代。

如果你的项目遇到以下情况,可以先从一次小问题排查开始合作:

  • ✅ PHP / Laravel / Yii2 老项目无人维护
  • ✅ Go / Gin 后端接口需要排查或优化
  • ✅ WordPress 网站访问慢、报错或插件冲突
  • ✅ Nginx / MySQL / Redis / Linux 服务器异常
  • ✅ CDN / Cloudflare / DNS / HTTPS 配置问题
  • ✅ 需要长期远程技术支持或兼职维护

更多介绍请查看:关于我 & 合作

微信:13980074657
邮箱:shuijingwanwq@gmail.com
Telegram:@shuijingwan
GitHub:https://github.com/shuijingwan

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理