Description
Vanf Lab Visual Translation lets you translate your site directly on the frontend: enable visual mode from the admin bar (“Translate this page”), click any text block, type the translation, done. No language limit.
- Unlimited languages: add as many as you want (code, name and emoji flag).
- Per-language URLs: each language lives at its own URL (
/en/my-page/); the default language has no prefix. The translation persists while browsing and each language is a separate page-cache entry (compatible with WP Rocket and similar). - Own dictionary: strings and translations are stored in dedicated tables.
- Multilingual SEO: per-language
hreflang+x-defaultin the<head>and canonical matching the active language. - Backward compatible:
?lang=and thelingua_langcookie keep working and redirect (302) to the prefixed URL. - Language switcher:
[lingua_switcher]shortcode + widget, with per-language URLs. - Import/export the dictionary as CSV and XLIFF 1.2 (for professional CAT tools).
- Media translation: translate alt text, title, caption and description per language, and even assign a different image file per language.
- Automatic translation (optional): translate pending strings in bulk with free providers — MyMemory (no key needed), DeepL (free API key) or Google (experimental). Everything is marked for your review; manual edits are never overwritten.
- Hook for automation: filter
vlvt_auto_translateto suggest translations with your own API.
External services
This plugin can connect to third-party translation APIs, only when you use the optional automatic-translation features. Nothing is sent anywhere unless you click “Translate” or run the automatic translation batch.
MyMemory (default)
What it is: a free translation API used for automatic translation out of the box, no API key required.
What data is sent and when: the source text of the strings you choose to auto-translate, sent when you run the “Automatic” tab batch or request a suggestion in visual mode. No personal data, no site URLs.
Terms: https://mymemory.translated.net/doc/usageterms.php — Privacy: https://mymemory.translated.net/doc/privacy.php
DeepL (optional, requires your free API key)
What it is: a machine-translation API used as the max-quality automatic-translation option.
What data is sent and when: the source text of the strings you choose to auto-translate, sent only when DeepL is selected as provider and you run a translation batch. Your API key is stored locally in your database and sent only to DeepL’s API.
Terms: https://www.deepl.com/pro-license — Privacy: https://www.deepl.com/privacy
Google Translate (experimental fallback)
What it is: an unofficial free Google translation endpoint used only as an experimental fallback.
What data is sent and when: the source text of the strings you choose to auto-translate, sent only when this provider is selected and you run a translation batch.
Terms: https://policies.google.com/terms — Privacy: https://policies.google.com/privacy
Installation
- Upload the
vanf-lab-visual-translationfolder towp-content/plugins/. - Activate the plugin from Plugins.
- Go to Vanf Lab Visual Translation Languages and add your languages.
- In Vanf Lab Visual Translation URLs verify that language prefixes are enabled.
- On the frontend, from the admin bar, choose “Translate this page” and start clicking texts.
FAQ
-
Do pretty URLs like /en/page work?
-
Yes, since 0.2.0. Each non-default language lives at its prefixed URL (
/en/my-page/); the default language has no prefix. Internal links are rewritten automatically and?lang=/ the cookie redirect to the prefixed URL. -
Does it work with page caches like WP Rocket?
-
Yes, that’s the point of the 0.2.0 design: since each language is a different URL, the cache stores one translated version per language without going through PHP.
-
Does it break the page’s JavaScript?
-
What if I have a page with a slug equal to a language code?
-
Avoid using a registered language code as a slug (e.g. don’t create a page called “en”), because the language prefix takes priority in the URL.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Vanf Lab Visual Translation” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Vanf Lab Visual Translation” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
0.7.2
- WordPress.org review compliance (round 2): removed error_reporting()/ini_set(‘display_errors’) from production code; sanitized all $_GET/$_POST/$_COOKIE/$_SERVER/$_FILES inputs at the point of reading (sanitize_text_field, sanitize_textarea_field, sanitize_key, esc_url_raw, wp_kses, map_deep, vlvt_sanitize_lang_code, vlvt_server helper); renamed the plugin prefix from lgv (3 chars) to vlvt (4 chars) across all functions, classes, constants, hooks, options, transients, AJAX actions, cookies, meta keys and assets.
0.7.1
- WordPress.org review compliance: renamed to Vanf Lab Visual Translation; switcher assets now use wp_enqueue_style/wp_enqueue_script/wp_add_inline_style; AJAX handlers use nonces, capability checks and paired output buffers; translation text is sanitized with wp_kses on save; $_SERVER inputs are sanitized via a helper; the Custom CSS textarea was removed; translation files (.po/.mo) are no longer bundled (handled by translate.wordpress.org); external translation services (MyMemory, DeepL, Google) are documented in the readme.
0.7.0
- Per-language image files: the Media tab now lets you assign a different image file per language (perfect for banners with text). Frontend swaps automatically via
wp_get_attachment_image_srcandwp_get_attachment_urlfilters.
0.6.0
- XLIFF 1.2 import/export: new professional translator workflow in Import / Export. Export translation jobs as XLIFF for CAT tools (memoQ, Trados, OmegaT), re-import the translated file — translations land in the dictionary as manual (never overwritten).
- Media translation: new “Media” tab. Translate alt text, title, caption and description of your media library per language. Values live in the dictionary, so the frontend output buffer translates them automatically, plus an explicit filter on image attributes.
- Switcher Studio live preview: now shows a clear message instead of blank when fewer than two languages are configured, and AJAX failures surface a visible error instead of failing silently.
0.5.4
- AJAX compatibility: the translation buffer now also hooks into
initfor admin-ajax.php (wheretemplate_redirectnever fires), so AJAX-rendered HTML (e.g. video theme history/watchlist endpoints) gets translated too, including string values inside JSON responses.
0.5.1
- Compatibility fix for themes that
exitduringtemplate_redirect(e.g. StreamVid profile pages): the output buffer now starts at priority 2 so it is always registered before any earlyexit.
0.5.0
- Frontend string discovery: new “Discover” tab that crawls sitemap.xml (or a manual URL list) and registers all visible texts + translatable attributes (title, alt, placeholder, aria-label, meta description, buttons) in the dictionary. Works in batches via AJAX with a progress bar, polite rate-limiting and retries. Honest limitation: 100% JavaScript-generated content is not captured server-side (visual mode and output buffering cover that).
- Automatic translation: new “Automatic” tab with a provider architecture. MyMemory (free, no key, works out of the box: ~5,000 chars/day, ~50,000 with email) as default; DeepL (500,000 chars/month free with a free API key) as the max-quality option; free Google endpoint as experimental fallback (unofficial, may be throttled).
- “Translate all pending” button: translates in atomic per-string batches, marking them as automatic (pending review). “Only automatic” filter in Strings, 🤖 badge and “Mark as reviewed” action. If you edit an automatic translation by hand, it becomes manual and is never overwritten.
- Per-provider quota control (day/month) with graceful stop: when exhausted it stops on its own and notifies, without breaking the batch. Already-translated strings are not re-translated.
- The visual mode
vlvt_auto_translatehook now suggests translations with the configured provider (respecting its quota). - Privacy: texts are sent to the chosen provider’s servers; documented in the admin.
0.4.0
- Automatic language detection on first visit: new “Detection” tab in the admin.
- Priority chain: explicit user choice (always wins) browser language (Accept-Language) IP geolocation configurable fallback language. Configurable method: browser + IP (recommended), browser only or IP only.
- Country-by-IP providers in order: Cloudflare header (free, no external calls), configurable local CIDR=COUNTRY map, and optional external API (off by default for privacy) with aggressive transient caching.
- Bundled country languages table (all ISO countries: CAen/fr, BEnl/fr/de, CHde/fr/it, INen/hi, etc.); the first language matching your active languages wins.
- 302 redirect with anti-cache headers to the prefixed URL; never redirects bots/crawlers (critical for SEO), nor admin, AJAX, REST or CRON. First visit only (30-day vlvt_detected cookie).
- Options: scope (all pages or homepage only), “We switched you to X” notice with a link to go back, and a test simulator (country + Accept-Language) to see which language would result.
- Without active URL prefixes, detection sets the lingua_lang cookie and the translation is applied via output buffering.
0.3.1
- Color picker with transparency: the 5 Switcher Studio colors now have an opacity slider; rgba() is saved when there is transparency, classic hex otherwise (compatible with already-saved values).
- Tooltip with the language name on hover, enabled by default and toggleable from the Switcher tab. Text comes out in the site’s active language (English site “Spanish”; Spanish site “Inglés”), with a built-in 42-language dictionary and fallback to the native name.
- Accessibility improvement: each switcher option carries an aria-label with the language name.
0.3.0
- Switcher Studio: new customization tab for the language switcher.
- 7 display modes: dropdown, horizontal list, flags only, text only, flag+text, opposite-language button and pill with globe + modal dialog (Airbnb style).
- Set of 55 own SVG flags (flag-icons style) with rectangle/rounded/circle shape and configurable size.
- Per-language flag variant: pick UK or USA for English, Spain/Mexico/Argentina/Colombia for Spanish, Portugal/Brazil, France/Quebec, Germany/Austria/Switzerland, China/Taiwan, etc. You can also upload your own SVG per language.
- Configurable text: native name, ISO code or nothing; flag position (before/after/hidden); per-language custom label.
- Behavior: open on click or hover, up/down direction, animations, search box inside the dropdown, manual drag or alphabetical order, show/hide current and default language, hide languages without translations.
- Intuitive styling: colors, borders, padding, typography, shadow, one-click preset gallery and live preview in the admin.
- Own mobile section: different mode on mobile (flags only or full-screen drawer) with configurable breakpoint.
- Placement: [lingua_switcher] shortcode with attributes (mode, flag_shape, name_format…), widget, menu item and floating button.
- Accessibility: ARIA listbox/dialog, keyboard navigation (Tab, arrows, Enter, Escape) and visible focus.
0.2.0
- Language-prefixed URLs (/en/my-page/): the language persists while browsing and each language is a separate page-cache entry.
- 302 redirect from ?lang= and the lingua_lang cookie to the prefixed URL; 301 from the default language prefix to the prefix-less canonical.
- Automatic internal link rewriting (permalinks, home_url, menus) with the active language prefix.
- Per-language hreflang + x-default in the ; canonical matching the language.
- Language switcher (shortcode and widget) with per-language URLs.
- New “URLs” tab in the admin to enable/disable prefixes and redirects.
- The 0.1.0 output buffering stays as a second layer.
0.1.0
- Initial release: unlimited language manager, own dictionary, click-to-translate visual mode, switcher, CSV.