Linux 软件免费装
Banner图

NPC Slug Genius

开发者 npc01
更新时间 2026年10月20日 08:37
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

seo permalink ai slug japanese

下载

1.1.2 1.0.0 1.1.3 1.1.0 1.1.1

详情介绍:

NPC Slug Genius is built for Japanese WordPress sites that want short English URL slugs without the manual translation work. A literal translation of a Japanese title does not always make a good slug. A word-for-word translation can give you slugs like recruitment-information (from 採用情報) or company-introduction (from 会社案内). NPC Slug Genius takes a different approach: its prompt instructs the AI to use the short English words that websites commonly use for such pages, such as careers and about-us. For Japanese-specific concepts that have no clean English equivalent (補助金 program names, etc.), the AI is instructed to keep the Romaji and translate only the surrounding words, for example apply-monozukuri-subsidy. The actual output is generated by the AI model and may vary. Key features: Supported AI providers (choose any one): You only need an API key from one provider. Switch between providers anytime from the settings page. Getting started:
  1. Install and activate the plugin.
  2. Go to Settings > NPC Slug Genius.
  3. Choose your preferred AI provider from the dropdown.
  4. Get an API key from the provider's console and paste it in:
  5. Anthropic: console.anthropic.com
  6. OpenAI: platform.openai.com
  7. Google: aistudio.google.com
  8. Choose which post types should get automatic slug generation (default: posts and pages).
  9. Create a post with a Japanese title - the slug will be automatically generated when you save.

安装:

  1. Upload the plugin folder to /wp-content/plugins/, or install through the WordPress admin.
  2. Activate the plugin.
  3. Go to Settings > NPC Slug Genius and configure your API key.

升级注意事项:

1.1.3 Fixes a bug where a slug generated for a draft could take the slug of a published post or page, which could change the URL of the published one. 1.1.2 Updates the AI models for all three providers (GPT-4o mini will be removed from the OpenAI API on January 14, 2027) and fixes two slug generation bugs. 1.1.1 Confirmed compatibility with WordPress 7.0. 1.1.0 Multi-provider support: OpenAI ChatGPT and Google Gemini are now available alongside Anthropic Claude. 1.0.0 First release.

常见问题:

Do I need an API key to use this plugin?

Yes. You need an API key from one of the supported providers (Anthropic, OpenAI, or Google). You only need one - whichever you prefer.

How much does it cost to run?

Each slug generation is one API request: a fixed instruction text included in the plugin (about 3 KB) plus the post title, with a reply limited to 64 tokens. The plugin uses a low-cost model from each provider (Claude Haiku 5.5, GPT-6 Luna, Gemini 3.5 Flash-Lite). The actual cost depends on the provider's current pricing and on how often you save posts that need a new slug, so please check your provider's pricing page.

Can I switch between providers later?

Yes. You can change the active provider from the settings page anytime. API keys for unused providers are kept in your settings (but never sent anywhere) until you delete them.

What if my API key is wrong or the API is down?

The plugin fails silently. Your post saves normally with the default WordPress slug behavior (which keeps the Japanese title as the slug). No errors are shown to the visitor. If the provider does not respond, saving may take up to 30 seconds while the plugin waits for it. When the API call succeeds again, saving such a post replaces its Japanese slug if the post meets the conditions in "Which posts does this plugin process?" below, which changes its URL.

Which posts does this plugin process?

When a post is saved, the plugin tries to generate an English slug only if all of the following are true:

  • The post type is selected in the settings.
  • An API key is set for the active provider.
  • The post has a title, it is not an auto-draft, a revision, an attachment, or in the trash, and the user saving it has permission to edit it.
  • The current slug is empty, contains non-ASCII characters such as Japanese, or contains a percent sign followed by two hexadecimal digits (the percent-encoded form that WordPress uses for Japanese, such as %e3).
  • The slug is not locked (see the next question).
  • One of these applies: this plugin has generated a slug for the post before; you enabled "Also process posts created before plugin activation"; or the time the plugin was first activated on this site is recorded and the post is dated on or after it (posts that have no date yet, such as most unpublished drafts, count as new). The activation time is normally recorded when the plugin is activated.
If the API call fails, the AI's reply is cut off before it is complete (for example, at the reply limit), or WordPress cannot save the new slug, the post saves normally and the slug is not changed.

Can I edit the auto-generated slug manually?

Yes. A slug that you type yourself using only English letters, numbers and hyphens is never replaced. Once this plugin has generated a slug for a post, saving the post with a different, non-empty slug locks it. After that, the plugin does not generate a slug for that post again, even if you change the slug back to Japanese. On a published post, WordPress fills an empty slug from the title, so clearing the slug field usually results in a locked Japanese slug. One exception to this lock: if the slug is exactly the one that WordPress makes from the generated slug when the post is published under its current parent, it does not count as a change and does not lock the slug. A slug that you type yourself is not locked either if it is exactly that slug. WordPress adds a number such as "-2" in these cases:

  • Another post already uses the slug (for example, "contact-2" when you publish a draft whose slug "contact" is used by another post).
  • The slug is a reserved word such as "feed".
  • The slug is made only of numbers, depending on the post type and permalink settings.
The slug can still be locked in these cases:
  • You move a draft or pending page (or a post of another type that can have a parent) to another parent, or out from under its parent, in Quick Edit (WordPress adds the number based on the previous parent).
  • The post got the number while it was saved without this plugin's check (for example, while the plugin was inactive, while its post type was not selected in the settings, by a user or tool without permission to edit it, or while version 1.1.1 or earlier was active), and the slug without the number (for example, "contact") became free before the post was saved again (for example, the other post that used it was deleted, moved to the Trash, or given a different slug).
  • Version 1.1.1 or earlier could not save the generated slug for the post, so the post still has its Japanese slug.
Slugs that were locked by an earlier version stay locked after updating.

What data is sent to the AI provider?

The post title, together with a fixed instruction text included in the plugin and the API key of the selected provider (for authentication). The post content, author, categories, tags, and other user data are not sent. If the title itself contains personal information (for example, a person's name), that text is sent as part of the title. See "External services" below for details.

Does this work with custom post types?

Yes. Public post types, including public custom post types, are listed under Settings > NPC Slug Genius. Check the ones you want.

I installed this on a site with existing Japanese posts. Will their URLs change?

Not by default. Posts dated before the plugin was first activated on this site are skipped, to protect existing URLs. The settings page shows this time as "Plugin was activated on". Deactivating and reactivating the plugin does not change it; deleting the plugin resets it. However, a post dated on or after that time that still has a Japanese slug (for example, because the plugin was inactive, no API key was set, or the API call failed when the post was published) gets an English slug the next time it is saved, if it meets the conditions in "Which posts does this plugin process?" above. This changes its URL. If you want older posts to be processed as well, enable "Also process posts created before plugin activation" in the settings. This does not convert posts in bulk: each post is processed the next time it is saved (warning: this changes existing URLs). Locked slugs are not changed.

更新日志:

1.1.3 1.1.2 1.1.1 1.1.0 1.0.0