{"id":405355,"date":"2024-07-23T08:00:00","date_gmt":"2024-07-23T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/rewrite-bases-internationalization\/"},"modified":"2025-04-16T21:13:00","modified_gmt":"2025-04-16T21:13:00","slug":"rewrite-bases-internationalization","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/rewrite-bases-internationalization\/","title":{"rendered":"Rewrite Bases Internationalization"},"content":{"rendered":"<p>This plugin allows you to customize and internationalize the rewrite bases for author archives, search results, comments and page slugs in WordPress. It provides an easy-to-use interface in the Permalinks Settings page to set custom values for these bases.<\/p>\n<p>If you notice that your permalink changes aren\u2019t reflecting on your site, try the following steps:<\/p>\n<ol>\n<li>Go to Settings > Permalinks in your WordPress admin panel.<\/li>\n<li>Without making any changes, click the \u201cSave Changes\u201d button at the bottom of the page.<\/li>\n<\/ol>\n<h3>Key Features<\/h3>\n<ul>\n<li>Customize rewrite bases for author, search, comments and page (pagination) slugs<\/li>\n<li>Automatically uses WordPress\u2019s language-specific terms as defaults, if available<\/li>\n<li>Integrates seamlessly with the WordPress Permalinks Settings page<\/li>\n<\/ul>\n<h3>Motivation<\/h3>\n<p>Internationalized rewrite bases for author, search, comments and page (pagination) in WordPress are not part of the WordPress Core. This is because the <a href=\"https:\/\/github.com\/WordPress\/wordpress-develop\/blob\/6.5\/src\/wp-includes\/class-wp-rewrite.php\" rel=\"nofollow ugc\">WP_Rewrite<\/a> class uses <a href=\"https:\/\/github.com\/WordPress\/wordpress-develop\/blob\/c26d2a30d5fbff5bc8fd613f9862a2bcc9c3e62b\/src\/wp-includes\/class-wp-rewrite.php#L49\" rel=\"nofollow ugc\">hardcoded strings<\/a> which were never translated until 2024. There is an old ticket (<a href=\"https:\/\/core.trac.wordpress.org\/ticket\/1762\" rel=\"nofollow ugc\">#1762<\/a>) that discusses this issue, including the idea of modifying the <code>WP_Rewrite<\/code> property with a plugin. This plugin implements that solution. It extends the native Permalinks settings page and adds a section to change the rewrite bases for author, search, comments and page (pagination). By default, these are based on the current language of your site.<\/p>\n<h3>Want to contribute?<\/h3>\n<p>Check out the Plugin <a href=\"https:\/\/github.com\/timohubois\/rewrite-bases-internationalization\/\" rel=\"nofollow ugc\">GitHub Repository<\/a>.<\/p>\n<h3>Additional Info<\/h3>\n<p>For more information about the WordPress Rewrite API, please visit the <a href=\"https:\/\/developer.wordpress.org\/reference\/classes\/wp_rewrite\/\" rel=\"nofollow ugc\">WordPress Rewrite API documentation<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Internationalize rewrite bases for author, search, comments and page (pagination) slugs in WordPress.<\/p>\n","protected":false},"author":65,"featured_media":336136,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Rewrite Bases Internationalization - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"Internationalize rewrite bases for author, search, comments and page (pagination) slugs in WordPress."},"footnotes":""},"categories":[1],"tags":[928,124,4103,1426,273],"class_list":["post-405355","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-author","tag-comments","tag-pagination","tag-permalinks","tag-search"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/405355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=405355"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/405355\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/336136"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=405355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=405355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=405355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}