Let's talk about the conclusion first!
In the current FinchUI multilingual websiteIn the process of plug-in and Z-BlogPHP, the 404 page that comes with the theme will not call the third-party machine translation interface and will not consume the translation quota.

First, under what circumstances will a theme 404 page be displayed?
When the visited website address does not exist and the server forwards the request to Z-BlogPHP's index.php for processing, Z-BlogPHP will enter the route matching process. If no route matches successfully, the system will set the HTTP 404 status and render the template/404.php of the current theme.
Therefore, whether there is no article address, category address, or arbitrarypseudo-staticThe path, as long as Z-BlogPHP eventually takes over and displays the theme 404, will use the theme's 404 template.
Second, the translation process of multilingual plug-ins in normal pages
During normal page processing, the plug-in will open the output buffer at the beginning of the page; after the page template, theme and other plug-ins output is completed, the entire HTML is obtained at the end of the page for link rewriting, language markup processing and body machine translation.
正常页面:
Index_Begin → 开启输出缓冲 → 路由与模板输出 → Index_End → 处理 HTML → 必要时请求翻译接口The plugin will only process HTML if it is executed to the end of the page; and only text that is not a default language, is not simple and complex, has translation services enabled, and misses the local cache will request a third-party translation interface.
Why won't the 404 page be translated?
404 is handled differently from a normal page. After the route fails to match, Z-BlogPHP will enter the error handler, load the theme's 404 template, and immediately end the PHP request.
404 页面:
Index_Begin → 开启输出缓冲 → 路由未匹配 → 输出主题 404 模板 → 结束请求
不会进入:Index_End → HTML 翻译处理 → 翻译接口请求Although the theme 404 template will output text such as "the page does not exist" and "return to the home page", these text will not enter the body translation processing steps of the multilingual plug-in. When PHP ends the request, it will only directly release the existing output buffer content, and will not perform the translation processing registered by the plug-in at the normal page end stage.
404 Copywriting Source of FinchUI Store Theme
Taking the FinchUI Store theme as an example, template/404.php uses the theme's native language pack variable, for example:
{$language['404title']}
{$language['404loading']}
{$language['404home']}
{$language['404goback']}
{$language['404tips']}The content comes from the language array of the theme itself, and is not obtained in real time through online translation interfaces such as DeepL, Google, Volcano Engine, Tencent Cloud, Alibaba Cloud, Baidu, Youdao, etc. Therefore, there is no translation service fee itself.
V. Two types of requests that need to be distinguished
| request type | Whether to execute theme 404 | Whether to consume translation credit |
|---|---|---|
| The server directly returns a static 404. | No | No. Neither PHP nor plugins will execute. |
| Z-BlogPHP route missed, showing topic 404 | is | No. The request ends after 404 output and does not enter translation processing. |
| 404 page automatically jumps or a new homepage request generated after the user clicks to return to the homepage | Not applicable | The first page is handled according to normal rules; only text to be translated that misses the cache may request the interface. |
How to verify by yourself
- Clean the translation cache in the background of the plugin, and record the usage of the background of the translation service provider.
- Consecutive access to several non-default language addresses that do not exist, such as /en/not-found-a,/en/not-find-b.
- Check zb_users/cache/fui_multilang/en/for new JSON translation cache files.
- Double check the number of requests or character consumption in the translation service provider background.
Expected Result: Visiting only the topic 404 page will not add a JSON cache for body translation, nor will it increase the usage of translation service providers.
Note: If the 404 page is configured to automatically return to the homepage, the spider or visitor's subsequent request to the homepage is a separate request. Homepage requests should be counted separately from the original 404 request.





Add customer service qq.
netizens commented