Just Translate

Mô tả

Just Translate is a lightweight plugin that enables you to manage translations of your WordPress website easily from the admin panel. It automatically detects and stores any string that appears on your website and supports language prefixes in URLs (like /en/, /id/, etc.).

Features:

  • Automatically capture and store untranslated strings
  • Define multiple supported languages
  • Friendly admin UI for translation management
  • Filter translated/untranslated strings
  • Bulk delete strings
  • Frontend-based translation (theme-agnostic)
  • SEO friendly

Shortcode

[wpjt_language_switcher]

Parameters:

  • hide_flag – Hide language flag icon (default: false)
  • show_name – Show language name (default: false)
  • display_name – Define the type of name to display when show_name=true
    Options:

    • locale: e.g., id-ID
    • lang: e.g., id
    • name: e.g., Indonesian (Indonesia)
    • native_name: e.g., Indonesia (Indonesia)
    • english_name: e.g., Indonesian (Indonesia)
    • lang_name: e.g., Indonesian
    • lang_native_name: e.g., Indonesia
    • lang_english_name: e.g., Indonesian

Example usage:

[wpjt_language_switcher show_name=true display_name=lang_native_name]

Hooks

1. wpjt_locale_slug
Filter the URL slug for a given locale.

add_filter('wpjt_locale_slug', function($slug, $locale) {
    $slugs = [
        'ja-JP' => 'japanese',
        'id-ID' => 'my-slug',
        'en-US' => 'en',
    ];
    return $slugs[$locale] ?? $slug;
}, 10, 2);

2. wpjt_setting_locales
Add or remove locale codes in the settings panel.

add_filter('wpjt_setting_locales', function($locales) {
    $locales[] = 'jv-ID';
    $locales[] = 'su-ID';
    return $locales;
});

3. wpjt_should_skip_string
Skip specific strings from being translated.

add_filter('wpjt_should_skip_string', function($skip, $string) {
    if (trim($string) === 'WordPress') {
        $skip = true;
    }
    return $skip;
}, 10, 2);

Cài đặt

  1. Upload the plugin files to the /wp-content/plugins/just-translate/ directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.
  3. Go to Translations > Settings to configure your supported locales.
  4. Begin using the translation panel to manage detected strings.

Hỏi đáp

How are strings detected?

Every text test that appears on your website will be captured and stored automatically if it has not been translated.

Does it support custom post types or themes?

Yes. The plugin is theme-agnostic and works with custom post types, themes, and almost all builders (please let me know if there are any builders that are incompatible).

How do I switch languages?

Use the [wpjt_language_switcher] shortcode to display a language switcher.

Đánh giá

Không có đánh giá nào cho plugin này.

Người đóng góp & Lập trình viên

“Just Translate” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.

Những người đóng góp

Nhật ký thay đổi

0.0.10

Fix WP_DEBUG_DISPLAY condition

0.0.9

  • Fix cache by device
  • Add ability to translate link tag url

0.0.8

  • Fix WP_Filesystem Initialization

0.0.7

  • Change cache storage from database to files
  • Add ability to translate http header links

0.0.6

  • Fix internal link recognition when no scheme or host is specified
  • Code refactoring

0.0.5

  • improve perfomance (cache the translated html)
  • Code refactoring

0.0.4

  • Fixed bugs in string cache keys
  • Changed the condition for skipping string registration from WP_DEBUG to WP_DEBUG_DISPLAY.
  • Code refactoring

0.0.3

  • Add hreflang tags.
  • Add Content-Language header.

0.0.2

  • refactor.

0.0.1

  • Initial release.