=== VelaLang ===
Contributors: john201502
Tags: multilingual, translation, elementor, language switcher, hreflang
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.1.51
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Make your WordPress site multilingual without duplicating pages.

== Description ==

VelaLang lets WordPress sites become multilingual without creating duplicate pages.

This free version is focused on one primary language and one secondary language. It keeps the primary language in the normal WordPress title and editor, then stores the secondary language as extra fields on the same page or post. Visitors see the primary language at the normal URL and the secondary language at a clean prefixed URL.

Example:

* /pricing/ shows the primary language.
* /zh/pricing/ shows the secondary language from the same WordPress page.

Core ideas:

* No duplicate pages.
* One menu, two labels.
* One Elementor Free widget, two text values.
* No page linking.
* No string scanning.
* No complex translation database.
* A small support surface by design.

== Features ==

* Choose common primary and secondary languages from presets.
* Configure custom primary and secondary language names, codes, and locales.
* Configure a secondary URL prefix such as /zh/, /ja/, /fr/, or /es/.
* Warn about permalink and URL prefix conflicts before they become routing problems.
* Add secondary title, excerpt, and content fields to posts and pages.
* Highlight secondary-language fields clearly in Classic Editor, Block Editor, Elementor Free widgets, menus, widgets, and settings.
* Show translation completion status in the post and page lists.
* Add quick links to view the secondary-language version from post and page lists and editors.
* Add admin bar shortcuts for switching between primary and secondary versions while reviewing content.
* Translate the site title and tagline for the secondary language.
* Show secondary content at the prefixed URL.
* Add secondary labels to WordPress menu items.
* Automatically rewrite internal menu links for the secondary language.
* Automatically rewrite internal content links for the secondary language.
* Set the secondary language html lang/dir attributes on secondary URLs.
* Add secondary fields to common Elementor Free widgets, including text, links, images, maps, video URLs, icon lists, tabs, accordions, toggles, ratings, counters, progress bars, testimonials, social icons, and audio basics.
* Add secondary title fields to classic WordPress widgets, plus secondary content fields for Text and Custom HTML widgets.
* Output hreflang and x-default tags.
* Add a language switcher with [velalang_switcher].
* Choose a default switcher style: language names, language codes, dropdown, or globe button.
* Place the switcher manually, as the last menu item, or as a fixed floating switcher.
* Choose text, flags, or flags with text for the switcher.
* Choose the floating switcher position.
* Adjust floating switcher offsets and choose a preset floating style.
* Includes a translation template and Simplified Chinese translation files.
* Keeps settings and translated content when deleting the plugin unless cleanup is enabled.
* Optionally redirect first-time homepage visitors based on browser language.

== Supported Editors ==

VelaLang intentionally keeps a small support surface.

Supported in this version:

* Classic Editor.
* WordPress Block Editor, using the VelaLang secondary-language panel in the editor's meta boxes area.
* Elementor Free common widgets, including Heading, Text Editor, Text Path, Video, Button, Image, Image Carousel, Google Maps, Icon, Icon List, Icon Box, Image Box, Alert, Testimonial, Counter, Progress Bar, Star Rating, Social Icons, SoundCloud, Audio, Tabs, Accordion, and Toggle.
* Classic WordPress widgets: secondary widget titles, plus secondary widget content for Text and Custom HTML widgets.

Not supported in this version:

* Divi.
* Bricks.
* Beaver Builder.
* WPBakery.
* Oxygen.
* More than two languages.
* Elementor Pro widgets, Theme Builder, forms, loops, and advanced dynamic content.
* Deep media-library attachment translation.
* WooCommerce translation.

== Installation ==

1. Upload the plugin folder to /wp-content/plugins/.
2. Activate VelaLang in the Plugins screen.
3. Go to VelaLang in the WordPress admin menu.
4. Choose or configure your languages and the secondary URL prefix.
5. Edit a page or post and fill in the VelaLang secondary-language version fields.
6. Edit menu items and fill in secondary navigation labels when needed.
7. Add [velalang_switcher] where you want the language switcher to appear.

== Language Switcher ==

Use the VelaLang shortcode:

* [velalang_switcher]

The default style can be selected in VelaLang in the WordPress admin menu.

Shortcode examples:

* [velalang_switcher style="names"]
* [velalang_switcher style="codes"]
* [velalang_switcher style="dropdown"]
* [velalang_switcher style="globe"]
* [velalang_switcher icon="yes"]

== Frequently Asked Questions ==

= Does this plugin create duplicate pages? =

No. The secondary language is stored on the same page or post.

= Does it translate content automatically? =

No. This free version helps you enter and display a secondary language manually.

= Does it support more than two languages? =

Not in this free MVP. The product direction is multilingual, but this first version is intentionally focused on one primary language and one secondary language.

= Is it only for English and Chinese? =

No. English and Chinese are only defaults. You can choose common language presets or enter custom language names, codes, locales, and URL prefixes.

= Does it support Elementor? =

Yes. VelaLang Free supports many common Elementor Free widgets, including text, links, images, maps, video URLs, tabs, accordions, toggles, counters, ratings, testimonials, social icons, and audio basics. Elementor Pro widgets and deeper Theme Builder support are not included in the free version.

= Does it support every page builder? =

No. This plugin intentionally supports Classic Editor, the Block Editor, and basic Elementor widgets only.

= Will my content remain if I deactivate the plugin? =

Yes. Your primary-language content remains normal WordPress content. Secondary-language content is stored as post meta and menu item meta.

== Changelog ==

= 0.1.51 =
* Escaped secondary post content returned through the content filter.
* Renamed the main plugin class to use a more distinct VelaLang prefix.

= 0.1.50 =
* Renamed the plugin to VelaLang and updated the text domain for WordPress.org review.
* Moved settings-page JavaScript into an enqueued admin script.
* Removed old shortcode aliases with generic prefixes.
* Escaped the secondary title returned through the title filter.

= 0.1.49 =
* Updated the WordPress tested-up-to header for Plugin Check.

= 0.1.48 =
* Added translator comments for placeholder strings and tightened floating switcher output escaping.

= 0.1.47 =
* Addressed Plugin Check warnings for translation loading, uninstall globals, public language switcher GET handling notes, and menu field sanitization.

= 0.1.46 =
* Release candidate for the first WordPress.org submission.
* Updated readme details for Block Editor, Elementor Free, WordPress widget, switcher, and site identity support.
* Improved Block Editor meta box height handling.

= 0.1.0 =
* Initial MVP release.
