Title: AS Flex Language Switcher
Author: achtsekunden
Published: <strong>14 Setembro, 2026</strong>
Last modified: 14 Setembro, 2026

---

Procurar plugins

![](https://ps.w.org/as-flex-language-switcher/assets/icon-256x256.png?rev=3694633)

# AS Flex Language Switcher

 Por [achtsekunden](https://profiles.wordpress.org/achtsekunden/)

[Descarregar](https://downloads.wordpress.org/plugin/as-flex-language-switcher.0.1.42.zip)

 * [Detalhes](https://pt.wordpress.org/plugins/as-flex-language-switcher/#description)
 * [Avaliações](https://pt.wordpress.org/plugins/as-flex-language-switcher/#reviews)
 *  [Instalação](https://pt.wordpress.org/plugins/as-flex-language-switcher/#installation)
 * [Desenvolvimento](https://pt.wordpress.org/plugins/as-flex-language-switcher/#developers)

 [Suporte](https://wordpress.org/support/plugin/as-flex-language-switcher/)

## Descrição

AS Flex Language Switcher adds a language switcher to your site and translates the
visible page content on the fly when a visitor picks a language. There is no translation
editor, no per-language URLs, and no database of translated posts — the page is 
translated in the visitor’s browser, on demand, and the result is cached so the 
same text is never sent to the translation provider twice.

**Bring your own API key.** You choose one of the translation providers below and
enter your own API key for it. Because you use your own account, AS Flex Language
Switcher itself never charges you and never routes your content through a service
run by the plugin developer.

**Quick mode.** Want to try the plugin before setting up an API key? Enable quick
mode instead and it translates immediately, using the free (but unofficial, unsupported)
Google Website Translator widget entirely in the visitor’s browser. No sign-up, 
no credit card, no server round-trip — but also no availability guarantee, since
it’s not an official Google API and can stop working at any time. For a permanent,
reliable setup, switch to one of the API providers below. See the Privacy notice
in Settings before enabling it, and the External Services section below.

**Supported providers**

 * DeepL — Free or Pro API key (Free keys end in “:fx” and are automatically routed
   to DeepL’s free API host).
 * Anthropic (Messages API)

**Display**

 * Automatic placement as a top bar or a small sticky corner widget, or place it
   yourself anywhere with the `[lswitch]` shortcode.
 * Four designs: flag row, language codes only, an accessible custom dropdown, or
   a horizontal text list. Flags and codes can be combined.
 * For languages with more than one common flag (English, Spanish, Portuguese, Arabic),
   the flag is configurable per language.

**Visitor experience**

 * The visitor’s chosen language is remembered (cookie + local storage) and reapplied
   automatically on the next page.
 * Optional, off-by-default automatic detection of the visitor’s browser language.

#### What this plugin deliberately does not do

 * It does not create indexable per-language URLs (no `/en/`, no XML sitemap entries
   per language) and does not set `hreflang` tags, because a client-side translation
   is not a separate, crawlable page. If you need indexable translated pages for
   SEO, a plugin like WPML or Weglot is a better fit. See the FAQ for details.
 * It does not provide a translation editor for manual corrections.
 * It does not translate emails, feeds, or the WordPress admin area.

### External services

This plugin connects your site to a third-party translation service **only if you
configure it** — either by selecting an API provider and entering your own key, 
or by enabling quick mode, both in Settings  Language Switcher. With neither configured,
no data is sent anywhere and the switcher shows an admin-only notice instead of 
translating.

**API providers.** When a visitor picks a language that isn’t already cached, the
plugin sends the visible text of the current page from your server to the provider
you selected, together with the source and target language codes, and stores the
returned translation in a WordPress transient (cache) for the duration configured
in Settings so the same text isn’t sent again. No content is sent for pages the 
visitor doesn’t request in another language, and nothing is sent while the switcher
sits unused.

**Quick mode.** Instead of going through your server, the plugin loads Google’s 
own Website Translator widget script (`translate.google.com`) directly in the visitor’s
browser and lets it translate the page content client-side. This means page content
is sent from the visitor’s browser straight to Google whenever quick mode is on 
and a visitor selects a language — your server is not involved, and this happens
independently of and in addition to any API provider you may also have configured(
only one of the two is active for translation at a time, controlled by the quick
mode setting, but the widget script itself loads whenever quick mode is enabled).
As the site owner, you must disclose this in your privacy policy if you enable quick
mode. This is not an official, versioned Google API — it can change or stop working
without notice.

Depending on which provider you configure, this plugin sends data to one of the 
following services:

 * **Google Website Translator widget** (quick mode only) — `https://translate.google.
   com/`. Terms of Service: https://policies.google.com/terms — Privacy Policy: 
   https://policies.google.com/privacy
 * **DeepL API** — `https://api.deepl.com/` (Pro keys) or `https://api-free.deepl.
   com/` (Free keys, ending in “:fx” — chosen automatically). Terms: https://www.
   deepl.com/pro-license — Privacy Policy: https://www.deepl.com/privacy
 * **Anthropic API** — `https://api.anthropic.com/`. Terms: https://www.anthropic.
   com/legal/commercial-terms — Privacy Policy: https://www.anthropic.com/legal/
   privacy

Only the API provider you have selected in Settings is ever contacted; any other
provider listed above is never contacted unless you switch to it. Your API key is
stored in this site’s options table and is never sent anywhere except directly to
the provider it belongs to. Google’s widget script is contacted only while quick
mode is enabled, independently of whichever API provider is also configured.

## Ecrãs

[⌊Settings page — languages, display mode and design.⌉⌊Settings page — languages,
display mode and design.⌉[

Settings page — languages, display mode and design.

[⌊Settings page — translation provider and API key test.⌉⌊Settings page — translation
provider and API key test.⌉[

Settings page — translation provider and API key test.

[⌊Flag-row design in the front end.⌉⌊Flag-row design in the front end.⌉[

Flag-row design in the front end.

[⌊Language-codes-only design in the front end.⌉⌊Language-codes-only design in the
front end.⌉[

Language-codes-only design in the front end.

[⌊Custom accessible dropdown design in the front end.⌉⌊Custom accessible dropdown
design in the front end.⌉[

Custom accessible dropdown design in the front end.

[⌊Horizontal text-list design in the front end.⌉⌊Horizontal text-list design in 
the front end.⌉[

Horizontal text-list design in the front end.

## Instalação

 1. Upload the plugin to the `/wp-content/plugins/` directory, or install it through
    the WordPress plugin screen directly.
 2. Activate the plugin.
 3. Go to Settings  Language Switcher.
 4. Pick the languages you want to offer, a display mode and a design.
 5. Pick a translation provider and enter your own API key for it, then use “Test key”
    to confirm it works.

## Perguntas frequentes

### Does this cost me anything to run?

The plugin itself is free and has no server-side component run by the developer.
Translation requests go directly from your site to the provider you configured, 
using your own API key, so any cost comes from your usage of that provider’s API
under its own pricing — not from this plugin.

### Why don’t translated pages show up in Google in the target language?

Translation happens in the visitor’s browser after the page has already loaded, 
so there is no separate, crawlable URL per language and the plugin does not add `
hreflang` tags — adding them without real per-language URLs behind them would be
misleading to search engines. If you need indexable multilingual URLs for SEO purposes,
this plugin isn’t the right tool; consider WPML, Polylang or Weglot instead.

### What happens if I don’t set an API key?

The switcher still appears (if a display mode/shortcode is active), but selecting
a language will show a message that translation is temporarily unavailable, and 
administrators see a notice in Settings pointing this out.

### Is my visitors’ data sent anywhere?

Only the visible text of the page a visitor is currently translating, sent to the
single provider you configured, using your own API key. See “External services” 
above for exactly which service and what is sent.

### Can I control which text gets translated?

Add `translate="no"` or the class `notranslate` to any element you want the plugin
to skip. Script, style, code and form-input content is always skipped.

## Avaliações

Este plugin não tem avaliações.

## Contribuidores e programadores

“AS Flex Language Switcher” é software de código aberto. As seguintes pessoas contribuíram
para este plugin:

Contribuidores

 *   [ achtsekunden ](https://profiles.wordpress.org/achtsekunden/)

[Traduza o “AS Flex Language Switcher” para o seu idioma.](https://translate.wordpress.org/projects/wp-plugins/as-flex-language-switcher)

### Interessado no desenvolvimento?

[Consulte o código](https://plugins.trac.wordpress.org/browser/as-flex-language-switcher/),
consulte o [repositório SVN](https://plugins.svn.wordpress.org/as-flex-language-switcher/),
ou subscreva o [registo de alterações](https://plugins.trac.wordpress.org/log/as-flex-language-switcher/)
por [RSS](https://plugins.trac.wordpress.org/log/as-flex-language-switcher/?limit=100&mode=stop_on_copy&format=rss).

## Registo de alterações

#### 0.1.42

 * Security: fixed a non-atomic rate-limit counter, flagged by WordPress.org plugin
   review. The previous get_transient()/set_transient() read-then-write pattern 
   let concurrent requests race: two requests arriving at nearly the same moment
   could both read the same starting count and both write back count+1, silently
   undercounting and letting a burst of simultaneous requests slip past the intended
   cap. Replaced with a dedicated, atomically-incremented database table (one `INSERT...
   ON DUPLICATE KEY UPDATE` statement per request, using MySQL’s own row lock) for
   all four rate-limit tiers (global hourly, per-IP per-minute, per-IP hourly, and
   the `/nonce` endpoint). A daily cron prunes expired counters so the table doesn’t
   grow unbounded.
 * Remove: the Google Cloud Translation and OpenAI providers, per WordPress.org 
   plugin review feedback — provider code that’s implemented and reachable via the
   REST endpoint but not exposed in Settings was flagged as “locked/restricted functionality”
   under the Trialware guideline, regardless of the actual reason (this was never
   a paywall or license gate; see 0.1.37, it was hidden purely because neither had
   been tested yet with a real key). Rather than re-enable two still-untested providers,
   they’re removed entirely — DeepL and Anthropic, both live-tested, are unaffected.
   Existing installs with Google or OpenAI selected fall back to DeepL automatically.
 * Change: removed the “Plugin URI” header — it pointed to a page that doesn’t exist
   yet on this developer’s site (that URL structure is currently reserved for this
   developer’s separately-sold products). Plugin URI is optional per the WordPress
   plugin header spec; Author URI (https://achtsekunden.com) is unaffected and still
   resolves.
 * Fix: the “No API key is set for the currently active provider” admin warning 
   showed even when quick mode (which needs no API key at all) was enabled — the
   check only looked at whether a provider key was set, not whether quick mode made
   that irrelevant.
 * Fix: the full-width bar (the “automatically as a full-width bar” display mode)
   no longer stays pinned to the top of the viewport while scrolling. It’s normal,
   non-sticky document flow now — it appears once at the top and scrolls away with
   the rest of the page like any other content, by request. Found live while verifying
   this: without its own stacking context, an open dropdown could then be visually
   clipped by a theme’s own `position:sticky` header sitting above it — fixed by
   keeping a non-offset `position:relative` and z-index on the bar (this does not
   reintroduce sticky/fixed behavior, just restores correct stacking order for the
   open dropdown).
 * Fix: the “flags” display design’s SVG icon sprite could silently never print 
   on themes that don’t call `wp_body_open()`. A hook-priority bug: the sprite’s“
   has the switcher actually rendered yet on this page” check ran before the JS-
   fallback path used on such themes had a chance to set it, so flag icons rendered
   as empty boxes even though the switcher itself worked correctly.
 * Add: “Center” as a third position option, alongside the existing “Left edge”/”
   Right edge”. Left/right continue to apply to both automatic placement modes; 
   center is new and only applies to the full-width bar — the small floating corner
   widget has no coherent center position, so it keeps left/right only.

## Metadados

 *  Versão **0.1.42**
 *  Última actualização **Há 1 dia**
 *  Instalações activas **Menos de 10**
 *  Versão do WordPress ** 6.0 ou superior **
 *  Testado até **7.1**
 *  Versão do PHP ** 7.4 ou superior **
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/as-flex-language-switcher/)
 * Etiquetas
 * [i18n](https://pt.wordpress.org/plugins/tags/i18n/)[language switcher](https://pt.wordpress.org/plugins/tags/language-switcher/)
   [localization](https://pt.wordpress.org/plugins/tags/localization/)[multilingual](https://pt.wordpress.org/plugins/tags/multilingual/)
   [translation](https://pt.wordpress.org/plugins/tags/translation/)
 *  [Visualização avançada](https://pt.wordpress.org/plugins/as-flex-language-switcher/advanced/)

## Classificações

Ainda não foram submetidas avaliações.

[Your review](https://wordpress.org/support/plugin/as-flex-language-switcher/reviews/#new-post)

[Ver todas as revisões](https://wordpress.org/support/plugin/as-flex-language-switcher/reviews/)

## Contribuidores

 *   [ achtsekunden ](https://profiles.wordpress.org/achtsekunden/)

## Suporte

Tem algo a dizer? Precisa de ajuda?

 [Ver fórum de suporte](https://wordpress.org/support/plugin/as-flex-language-switcher/)