WP Manifestindependent plugin directory
manifest / i18n / fdev_plugin_translate

Plugin Tradução Live & Chave

O melhor plugin de tradução para Wordpress!

by Renato Assis / FivemDEV.org · github.com/fivemdevorg/fdev_plugin_translate

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/fivemdevorg/fdev_plugin_translate/archive/refs/heads/main.zip

PRINTSCREEN:

image image image image image image image image

Plugin de Tradução para WordPress

Este plugin permite tradução de textos no WordPress de duas formas:

  • Tradução live no front-end (estilo TranslatePress): clique em textos com o atributo data-ptlc="chave" e adicione traduções diretamente pelo site.
  • Tradução por chave (estilo IP.Board): use a função ptlc_translate('chave', 'idioma') ou o shortcode [ptlc key="chave" lang="pt_BR"] no código/tema e gerencie traduções por chave.

Funcionalidades

  • Painel administrativo completo com dashboard de traduções por idioma.
  • Abas por idioma com contagem de traduções e edição inline.
  • Adição, edição e exclusão de traduções por chave.
  • Cache de traduções em memória para performance.
  • Shortcode de tradução por chave: [ptlc key="chave" lang="pt_BR"].
  • Shortcode de seletor de idioma: [ptlc_language_selector] (dropdown, inline, list).
  • URLs amigáveis por idioma (prefixos curtos ex.: /en/, /es/).
  • Detecção de idioma via URL, query var e fallback para idioma padrão.
  • Controle de idioma padrão e idiomas ativos.
  • Modo Live com toggle no Admin Bar.
  • Salvar traduções em massa via AJAX.
  • Tradução inline com geração automática de chave.
  • SEO multilíngue:
    • Hreflang, meta language, canonical, Open Graph, Schema.org.
    • URLs alternativos e sitemap multilíngue.
    • Integração com robots.txt.
  • Ferramentas de banco de dados:
    • Exportar/importar traduções (todos ou por idioma).
    • Otimização de tabela.
    • Criação/atualização de índices.

Estrutura

  • plugin-traducao.php (arquivo principal do plugin)
  • /languages (pasta para arquivos de idioma)
  • /assets (JS/CSS para interface live)
  • /includes (lógica do plugin)

Como usar

  1. Instale e ative o plugin no WordPress.
  2. Configure os idiomas desejados no painel do plugin (menu Traduções).
  3. Defina o idioma padrão em Configurações.
  4. Para tradução live, adicione o atributo data-ptlc="chave" nos elementos HTML que deseja tornar editáveis no front-end.
  5. Para tradução por chave, use a função PHP ptlc_translate('chave', 'idioma') ou o shortcode [ptlc key="chave" lang="pt_BR"].
  6. Use o shortcode [ptlc_language_selector] para exibir o seletor de idioma no site.
  7. Para exportar/importar traduções ou otimizar o banco, use a aba “Banco de Dados”.

Seletor de idiomas (estilos e opções)

O seletor pode ser exibido em três estilos e com variações visuais.

Estilos disponíveis

  • Dropdown (padrão)
    • [ptlc_language_selector]
    • [ptlc_language_selector style="dropdown"]
  • Inline (botões horizontais)
    • [ptlc_language_selector style="inline"]
  • List (lista vertical)
    • [ptlc_language_selector style="list"]

Opções adicionais

  • Mostrar nomes dos idiomas
    • [ptlc_language_selector show_labels="true"]
  • Classe CSS personalizada
    • [ptlc_language_selector class="custom-class"]
  • Estilo compacto (visual menor)
    • [ptlc_language_selector class="compact"]

Este arquivo será atualizado conforme o desenvolvimento do plugin.


WordPress Translation Plugin

This plugin enables WordPress text translation in two ways:

  • Live front-end translation (TranslatePress style): click texts with the data-ptlc="key" attribute and add translations directly on the site.
  • Key-based translation (IP.Board style): use the ptlc_translate('key', 'language') function or the shortcode [ptlc key="key" lang="pt_BR"] in code/theme and manage key-based translations.

Features

  • Full admin dashboard with per-language translation tabs.
  • Language tabs with translation counters and inline editing.
  • Add, edit, and delete translations by key.
  • In-memory translation cache for performance.
  • Key translation shortcode: [ptlc key="key" lang="pt_BR"].
  • Language selector shortcode: [ptlc_language_selector] (dropdown, inline, list).
  • Friendly language URLs (short prefixes like /en/, /es/).
  • Language detection via URL, query var, and fallback to default language.
  • Default language and active language management.
  • Live mode toggle in the Admin Bar.
  • Bulk translation save via AJAX.
  • Inline translation with automatic key generation.
  • Multilingual SEO:
    • Hreflang, meta language, canonical, Open Graph, Schema.org.
    • Alternate URLs and multilingual sitemap.
    • Robots.txt integration.
  • Database tools:
    • Export/import translations (all or by language).
    • Table optimization.
    • Index creation/refresh.

Structure

  • plugin-traducao.php (main plugin file)
  • /languages (language files)
  • /assets (live UI JS/CSS)
  • /includes (plugin logic)

How to use

  1. Install and activate the plugin in WordPress.
  2. Configure the desired languages in the plugin panel (Translations menu).
  3. Set the default language in Settings.
  4. For live translation, add the data-ptlc="key" attribute to HTML elements you want editable on the front end.
  5. For key-based translation, use the PHP function ptlc_translate('key', 'language') or the shortcode [ptlc key="key" lang="pt_BR"].
  6. Use the [ptlc_language_selector] shortcode to display the language switcher.
  7. For export/import and database maintenance, use the “Database” tab.

This file will be updated as the plugin evolves.