Skip to content

Frontend

sfambach edited this page Aug 1, 2026 · 2 revisions

Frontend

English frontend with Deutsch / Englisch language switcher

On /en/ (or your target prefix), posts render in the target language when segments are cached. The footer (or primary menu) language switcher links between source and target — here Deutsch and Englisch, with the active language underlined. Enable the switcher under Settings, or add the shortcode / block instead.

Language URL prefixes

With Enable /lang/ URL prefixes on (default), target languages are served under prefixes such as /en/….

Example: German source site → English at /en/.

Visit the prefix after running Translate website now so most segments are already cached. See Settings and FAQ for timeouts with free on-the-fly APIs.

On-the-fly translation

When Translate missing segments on the fly is enabled, uncached segments may call the provider during page render. Free APIs (especially MyMemory) are slow; many uncached segments can hit PHP’s max execution time.

Protection:

  • Frontend on-the-fly is limited to a few API calls per request
  • The rest stays in the source language until the next visit or batch run
  • Admins see a notice when this happens; optional notice for visitors via Settings

Fix for blank pages / critical errors: run Translate website now first.

Language switcher

Three ways to show language links:

  1. Show language switcher (footer / primary menu) in Settings
  2. Shortcode [bt_language_switcher]
  3. Gutenberg block Language Switcher

Insert the block in the editor wherever you need it, or use the shortcode in classic content / widgets that support shortcodes.

Exclusions on the frontend

Excluded post types, IDs, and URL path prefixes stay in the source language and are not rewritten/translated. Configure under Settings.

Related

Clone this wiki locally