설명
Flex Translate is a lightweight, developer-friendly plugin for multilingual WordPress sites.
- Text translations with
ft( 'code' )andft_get( 'code' ) - Content translations for posts and pages (same slug per language)
- Path-based URLs such as
/ru/aboutand/en/contact - Language switcher helper with optional flag images
- Per-language fonts (self-hosted uploads or optional Google Fonts by family name)
- Taxonomy term name/description translations
- Clean uninstall (tables, options, and meta removed)
External services
Optionally, when you enter a Google Font family name in Manage Fonts, the plugin builds a Google Fonts stylesheet URL and loads it on the front end for visitors of that language. This is optional; you can use self-hosted font files instead. Users never paste arbitrary CSS/JS.
- Service: Google Fonts
- Terms: Google Terms of Service
- Privacy: Google Privacy Policy
No Google Fonts requests are made unless you choose a Google Font family for a language.
Privacy
Flex Translate stores language settings, translation strings, and optional font settings in your WordPress database. It does not send site content to Flex Translate servers. If you enable Google Fonts, browsers may request font files from Google; see the links above.
설치
- Upload the
flex-translatefolder to/wp-content/plugins/, or install the zip via Plugins Add New Upload Plugin. - Activate Flex Translate.
- Go to Flex Translate Languages and add your languages (set one as default).
- Optionally configure fonts under Manage Fonts and string translations under Text Translations.
- For posts/pages, use the Translation sidebar to assign a language or duplicate into another language.
- Visit Settings Permalinks and click Save once after activation (or after adding languages) so rewrite rules refresh.
FAQ
-
How do I show a translated string?
-
Use these helpers in your theme templates:
ft( 'main' ); // echoes the translation $val = ft_get( 'main' ); // returns the translation -
What URL format does the plugin use?
-
Clean path-based URLs: /ru/about, /am/contact. The default language has no prefix (/about) unless you enable “Prefix for Default Language” in Settings.
-
Yes. For example /test-page (default) and /ru/test-page can use the same slug when each has a different language assigned.
-
How do I show a language switcher?
-
echo ft_language_switcher();
-
Does the plugin require Google Fonts?
-
No. Google Fonts are optional. Prefer uploading
.woff2/.woff/.ttf/.otffiles in Manage Fonts if you want fully self-hosted fonts.
후기
이 플러그인에 대한 평가가 없습니다.
기여자 & 개발자
변경이력
1.3.2
- Plugin Check: remove hidden files and deploy markdown from the plugin package.
- Sanitize request URI on default-language prefix redirects; list ORDER BY uses prepared identifiers.
- Google Fonts stylesheets enqueue with a version; fonts form unslashes POST data before save.
1.3.1
- Hyphenated language prefixes now save and load string translations correctly.
- Language and translation saves check database results and report unique-key errors.
- Default-language prefix redirects keep query strings; frontend permalinks stay in the browsing language when a sibling exists.
- Duplicate now remaps hierarchical parents; saving a language already used in the group is rejected.
- Admin saves use post-redirect-get; translation delete is POST; AJAX duplicate errors are localized.
- Language filtering applies to frontend secondary queries (widgets, Query Loop) with
flex_translate_skip_langto opt out.
1.3.0
- Admin UI aligned with Flex Redirects: shared header, pill navigation, cards, stats, and badges.
1.2.4
- Manage Fonts: removed freeform stylesheet URL field; Google Fonts URL is built from family name + weights only.
- Upload font files must come from the site Media Library (uploads directory).
1.2.3
- Additional nonce / global prefix hardening for WordPress.org review.
1.2.2
- Removed arbitrary custom CSS/JS fields from Manage Fonts (WordPress.org guideline).
- Fonts and debug switcher assets now use wp_enqueue_style / wp_add_inline_style.
- Prefixed admin script handles, localized objects, AJAX action, and option keys.
- Author URI set to https://flexible.am/; Plugin URI omitted (must differ from Author URI).
1.2.1
- WordPress.org preparation: LICENSE file, readme third-party/privacy disclosure, contributor slug alignment.
- Replaced emoji status markers with translatable Yes labels.
- Packaging and submission checklist for directory review.
1.2.0
- Query layer: language meta filtering limited to the main query; existing meta_query values are merged.
- Documented helpers
ft(),ft_get(),ft_get_translated_page_id(),ft_language_switcher()added. - Rewrite rules respect
category_base/tag_base, CPT archives, and resolve singular posts/pages/CPTs viaft_path. - Security: tighter AJAX duplicate caps, scoped font MIME filters, POST language delete, validated language prefixes.
- Removed unused
flex_translate_termstable; taxonomy translations no longer mutate term slugs. - Performance: fonts option not autoloaded; rewrite flush only when needed; text translations paginated; DDL moved to upgrades.
- i18n:
load_plugin_textdomain(); multisite network activation support; flags in language switcher.
1.1.0
- Path-based URL routing (
/ru/about) replaces the old?lang=approach. - Full archive support: category, tag, author, search, date, feed, and pagination under language prefixes.
- New
ft_get()function returns a translation string (vsft()which echoes). - Taxonomy term translation for categories and tags.
- “Prefix for Default Language” setting is now wired into the routing logic.
- Capability check added to content translation save handler.
- Floating debug switcher gated behind
WP_DEBUG. - Performance:
ft_get_translated_page_id()results are now cached; taxonomy term filter skips admin and uses static caching. - Deduplicated URL-rewriting helpers; consolidated language-detection functions.
- Security:
esc_url()on Manage Fonts link; SQL injection fixes in admin queries.
1.0.0
- Initial release.
