﻿{"id":177,"date":"2026-03-05T09:43:44","date_gmt":"2026-03-05T08:43:44","guid":{"rendered":"https:\/\/baqueiro.es\/store\/?post_type=bdw_plugin_doc&#038;p=177"},"modified":"2026-03-05T19:13:38","modified_gmt":"2026-03-05T18:13:38","slug":"b-easy-translator","status":"publish","type":"bdw_plugin_doc","link":"https:\/\/baqueiro.es\/store\/plugin-docs\/b-easy-translator\/","title":{"rendered":"[B] Easy Translator"},"content":{"rendered":"\n<h2>Requirements<\/h2>\n<ul>\n  <li>WordPress 6.0 or higher<\/li>\n  <li>PHP 8.1 or higher<\/li>\n  <li>Pretty permalinks enabled (not <code>?p=123<\/code>)<\/li>\n  <li>Capability: <code>manage_options<\/code> to access settings (Administrator)<\/li>\n<\/ul><br>\n\n<h2>Installation<\/h2>\n<ol>\n  <li>Go to <strong>Plugins \u2192 Add New<\/strong> in your WordPress admin.<\/li>\n  <li>Click <strong>Upload Plugin<\/strong> and select the <code>.zip<\/code> file.<\/li>\n  <li>Click <strong>Install Now<\/strong>, then <strong>Activate<\/strong>.<\/li>\n<\/ol><br>\n\n<h2>Initial Setup<\/h2>\n<p>After activation, the plugin automatically:<\/p>\n<ul>\n  <li>Registers the current language (cookie + <code>?lang=<\/code> parameter).<\/li>\n  <li>Adds meta boxes to posts and pages for multilingual content.<\/li>\n  <li>Adjusts titles, descriptions, excerpts and categories per language.<\/li>\n  <li>Integrates menus and sitemaps with the language system.<\/li>\n<\/ul><br>\n\n<h2>Adding the Language Selector<\/h2>\n<p>Use the shortcode anywhere on your site:<\/p>\n<p><code>[bdw_seletor_idioma]<\/code><\/p>\n<p>Or the legacy shortcode (deprecated but still supported):<\/p>\n<p><code>    <div id=\"language-selector\" aria-label=\"Language selector\">\r\n                    <button class=\"lang-button\" data-lang=\"gl\">\r\n                <img src=\"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/6\/64\/Flag_of_Galicia.svg\/20px-Flag_of_Galicia.svg.png\" alt=\"Galego\" loading=\"lazy\" decoding=\"async\" fetchpriority=\"low\">\r\n                <span>Galego<\/span>\r\n            <\/button>\r\n                    <button class=\"lang-button\" data-lang=\"es\">\r\n                <img src=\"https:\/\/flagcdn.com\/w20\/es.png\" alt=\"Espa\u00f1ol\" loading=\"lazy\" decoding=\"async\" fetchpriority=\"low\">\r\n                <span>Espa\u00f1ol<\/span>\r\n            <\/button>\r\n                    <button class=\"lang-button\" data-lang=\"en\">\r\n                <img src=\"https:\/\/flagcdn.com\/w20\/gb.png\" alt=\"English\" loading=\"lazy\" decoding=\"async\" fetchpriority=\"low\">\r\n                <span>English<\/span>\r\n            <\/button>\r\n            <\/div>\r\n    <\/code><\/p>\n<p>The selector displays buttons for each enabled language with flag and name.<\/p><br>\n\n<h2>Managing Languages<\/h2>\n<p>Go to <strong>Settings \u2192 Idiomas (Seletor)<\/strong> to:<\/p>\n<ul>\n  <li>Enable or disable languages.<\/li>\n  <li>Add custom languages with code, label and flag.<\/li>\n  <li>Upload custom flag images from the media library.<\/li>\n<\/ul>\n<p><strong>Default languages:<\/strong> Galician (GL), Spanish (ES), English (EN) \u2014 active by default.<\/p>\n<p><strong>Pre-defined inactive:<\/strong> French, German, Italian, Japanese, Chinese, Dutch \u2014 available but disabled by\n  default.<\/p><br>\n\n<h2>Translating Post Content<\/h2>\n<p>When editing a post or page, use the meta boxes in the sidebar:<\/p>\n<ul>\n  <li><strong>T\u00edtulos por idioma:<\/strong> Custom title for each language.<\/li>\n  <li><strong>Descri\u00e7\u00f5es por idioma:<\/strong> Meta description for each language.<\/li>\n  <li><strong>Excertos por idioma:<\/strong> Custom excerpt for each language.<\/li>\n  <li><strong>Palavra-foco:<\/strong> Focus keyword per language for SEO audit.<\/li>\n<\/ul>\n<p>If a translation is not provided, the original content is used.<\/p><br>\n\n<h2>Translating Categories<\/h2>\n<ol>\n  <li>Go to <strong>Posts \u2192 Categories<\/strong>.<\/li>\n  <li>Edit a category.<\/li>\n  <li>Fill in the <strong>Translations<\/strong> section with name and description for each language.<\/li>\n  <li>Save the category.<\/li>\n<\/ol>\n<p>Category names and descriptions will change based on the selected language.<\/p><br>\n\n<h2>Translating Menus<\/h2>\n<p>The plugin automatically translates menu items using:<\/p>\n<ul>\n  <li>Translated post\/page titles when linked to content.<\/li>\n  <li>Labels separated by <code>|<\/code> for custom labels (e.g., <code>Home|Inicio|Inicio<\/code> for EN|ES|GL).<\/li>\n<\/ul>\n<p>Menu links automatically receive the <code>?lang=<\/code> parameter.<\/p><br>\n\n<h2>SEO Features<\/h2>\n<p>The plugin automatically generates:<\/p>\n<ul>\n  <li><strong>Hreflang tags:<\/strong> Signals alternate language versions to search engines.<\/li>\n  <li><strong>Canonical URLs:<\/strong> Respects the current language.<\/li>\n  <li><strong>Open Graph tags:<\/strong> Language-specific og:title, og:description, og:locale.<\/li>\n  <li><strong>Twitter Cards:<\/strong> Language-specific title and description.<\/li>\n  <li><strong>SEO Audit Checklist:<\/strong> On-page SEO analysis per language in the post editor.<\/li>\n<\/ul><br>\n\n<h2>Multilingual Sitemaps<\/h2>\n<p>The plugin creates custom XML sitemaps per language:<\/p>\n<ul>\n  <li><code>\/ml-sitemap-gl.xml<\/code> \u2014 Galician sitemap<\/li>\n  <li><code>\/ml-sitemap-es.xml<\/code> \u2014 Spanish sitemap<\/li>\n  <li><code>\/ml-sitemap-en.xml<\/code> \u2014 English sitemap<\/li>\n  <li><code>\/ml-sitemap-index.xml<\/code> \u2014 Sitemap index<\/li>\n<\/ul>\n<p>Go to <strong>Settings \u2192 Sitemaps por idioma<\/strong> to verify your sitemaps.<\/p><br>\n\n<h2>How Language Switching Works<\/h2>\n<p>When a visitor clicks a language button:<\/p>\n<ol>\n  <li>A cookie (<code>site_lang<\/code>) is set with the selected language.<\/li>\n  <li>A class is added to <code>&lt;body&gt;<\/code>: <code>lang-gl<\/code>, <code>lang-es<\/code>, or\n    <code>lang-en<\/code>.<\/li>\n  <li>The <code>lang<\/code> attribute on <code>&lt;html&gt;<\/code> is updated.<\/li>\n  <li>Titles, excerpts and category names update instantly (client-side).<\/li>\n  <li>Internal URLs receive the <code>?lang=<\/code> parameter.<\/li>\n<\/ol><br>\n\n<h2>Roles &amp; Permissions<\/h2>\n<ul>\n  <li><strong>Administrators (<code>manage_options<\/code>):<\/strong> Full access to language settings and sitemaps\n    configuration.<\/li>\n  <li><strong>Editors\/Authors (<code>edit_post<\/code>):<\/strong> Can fill in multilingual meta boxes on their posts.\n  <\/li>\n  <li><strong>Visitors:<\/strong> Can switch languages using the selector.<\/li>\n<\/ul><br>\n\n<h2>Troubleshooting<\/h2>\n\n<h2>Language selector not appearing<\/h2>\n<p><strong>Cause:<\/strong> Shortcode not being processed.<\/p>\n<p><strong>Solution:<\/strong> Use a Shortcode block in Gutenberg or a shortcode widget in page builders. Verify the\n  template calls <code>the_content()<\/code>. Test with a default theme to rule out conflicts.<\/p><br>\n\n<h2>Language buttons appear but nothing changes<\/h2>\n<p><strong>Cause:<\/strong> Theme missing <code>wp_head()<\/code> or <code>wp_footer()<\/code>, or JavaScript errors.<\/p>\n<p><strong>Solution:<\/strong> Verify your theme includes <code>&lt;?php wp_head(); ?&gt;<\/code> before\n  <code>&lt;\/head&gt;<\/code> and <code>&lt;?php wp_footer(); ?&gt;<\/code> before <code>&lt;\/body&gt;<\/code>. Check\n  browser console (F12) for JS errors. Temporarily disable optimization plugins that minify scripts.<\/p><br>\n\n<h2>Translated titles\/descriptions not showing<\/h2>\n<p><strong>Cause:<\/strong> Language not changing, SEO plugin overriding, or meta not saved.<\/p>\n<p><strong>Solution:<\/strong> Inspect the <code>&lt;body&gt;<\/code> class to confirm language is changing. Re-edit the\n  post and save again. Check if an SEO plugin (Yoast, Rank Math) is overriding the title \u2014 adjust its priority or\n  settings.<\/p><br>\n\n<h2>Category names not translating<\/h2>\n<p><strong>Cause:<\/strong> Translations not entered or theme using hardcoded labels.<\/p>\n<p><strong>Solution:<\/strong> Edit each category and fill in the Translations section. Ensure your theme uses WordPress\n  template functions like <code>the_category()<\/code> or <code>single_cat_title()<\/code>.<\/p><br>\n\n<h2>Sitemap URLs return 404<\/h2>\n<p><strong>Cause:<\/strong> Rewrite rules not flushed.<\/p>\n<p><strong>Solution:<\/strong> Go to <strong>Settings \u2192 Permalinks<\/strong> and click &#8216;Save Changes&#8217; to flush rewrite\n  rules. Use the &#8216;Flush rewrite&#8217; button on the Sitemaps page if available. Check for conflicts with other sitemap\n  plugins.<\/p><br>\n\n<h2>Wrong language due to cache\/CDN<\/h2>\n<p><strong>Cause:<\/strong> Page cache ignoring the language cookie.<\/p>\n<p><strong>Solution:<\/strong> Configure your cache\/CDN to vary by the <code>site_lang<\/code> cookie. The plugin sends\n  <code>Vary: Cookie<\/code> header, but your CDN must respect it. Disable full page cache for multilingual pages if\n  needed.<\/p><br>\n\n<h2>Access denied to Sitemaps settings<\/h2>\n<p><strong>Cause:<\/strong> User lacks <code>manage_options<\/code> capability.<\/p>\n<p><strong>Solution:<\/strong> Log in with an Administrator account.<\/p><br>\n\n<h2>Privacy &amp; Data<\/h2>\n<p>This plugin:<\/p>\n<ul>\n  <li>Sets a cookie (<code>site_lang<\/code>) to remember the selected language.<\/li>\n  <li>Does <strong>not<\/strong> collect personal data.<\/li>\n  <li>Does <strong>not<\/strong> send data to third parties.<\/li>\n  <li>Loads flag images from external CDNs (flagcdn.com, Wikimedia) by default \u2014 can be replaced with local images in\n    settings.<\/li>\n<\/ul>\n<p>The cookie is essential for functionality and does not track users.<\/p><br>\n\n<h2>Uninstallation<\/h2>\n<p>To remove the plugin:<\/p>\n<ol>\n  <li>Deactivate the plugin.<\/li>\n  <li>Delete it from <strong>Plugins \u2192 Installed Plugins<\/strong>.<\/li>\n<\/ol>\n<p><strong>Note:<\/strong> Post meta data (translated titles, descriptions, excerpts) remains in the database for\n  potential future use. Language settings are removed on uninstall.<\/p><br>\n","protected":false},"excerpt":{"rendered":"<p>Requirements WordPress 6.0 or higher PHP 8.1 or higher Pretty permalinks enabled (not ?p=123) Capability: manage_options to access settings (Administrator) Installation Go to Plugins \u2192 Add New in your WordPress admin. Click Upload Plugin and select the .zip file. Click Install Now, then Activate. Initial Setup After activation, the plugin automatically: Registers the current language [&hellip;]<\/p>\n","protected":false},"featured_media":0,"template":"","class_list":["post-177","bdw_plugin_doc","type-bdw_plugin_doc","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/baqueiro.es\/store\/wp-json\/wp\/v2\/bdw_plugin_doc\/177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/baqueiro.es\/store\/wp-json\/wp\/v2\/bdw_plugin_doc"}],"about":[{"href":"https:\/\/baqueiro.es\/store\/wp-json\/wp\/v2\/types\/bdw_plugin_doc"}],"version-history":[{"count":2,"href":"https:\/\/baqueiro.es\/store\/wp-json\/wp\/v2\/bdw_plugin_doc\/177\/revisions"}],"predecessor-version":[{"id":305,"href":"https:\/\/baqueiro.es\/store\/wp-json\/wp\/v2\/bdw_plugin_doc\/177\/revisions\/305"}],"wp:attachment":[{"href":"https:\/\/baqueiro.es\/store\/wp-json\/wp\/v2\/media?parent=177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}