=== Slim Language Switcher - Multilingual Manager with hreflang SEO Tags ===
Contributors: slimplugins
Tags: multilingual, language, switcher, hreflang, translation
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add a customizable language switcher and manage alternate language URLs with hreflang support.

== Description ==

Slim Language Switcher helps you present the same content in multiple languages without replacing WordPress’s own language files.

Add the languages you support, assign a default URL to each one, then optionally override those URLs on posts, pages, products, and terms. The plugin outputs a language switcher (shortcode or block) and can print hreflang tags plus JSON-LD for search engines.

= Features =

* Language directory stored in WordPress options (no custom database tables)
* Light, dark, and auto themes with editable color palettes
* Dropdown, list, and inline layouts
* Live appearance designer with a copyable shortcode
* Language Switcher block with layout and theme controls
* Alternate URL fields on posts, pages, public post types, and public taxonomies
* Optional WooCommerce shop, product category, and product tag support
* Optional hreflang and JSON-LD output

This plugin does not translate content automatically. Pair it with translated pages or a separate translation workflow.

== Installation ==

1. Upload the `slim-language-switcher` folder to the `/wp-content/plugins/` directory, or install the plugin from the WordPress plugins screen.
2. Activate the plugin through the Plugins screen.
3. Open **Slim Language Switcher → Languages** and add your languages.
4. Style the switcher under **Appearance**, then place it with the shortcode, the Language Switcher block, or the PHP helper.

== Frequently Asked Questions ==

= How do I display the switcher? =

Use the shortcode `[slim_language_switcher]`, insert the Language Switcher block, or call `slim_language_switcher_get_switcher()` in a theme template.

= What shortcode attributes are available? =

`layout` (`dropdown`, `list`, `inline`), `theme` (`light`, `dark`, `auto`), `flags` (`yes` or `no`), and `names` (`yes` or `no`). Omit an attribute to inherit the value saved in Appearance.

= Does the plugin translate my site? =

No. It stores language metadata and alternate URLs, then helps visitors move between those URLs.

= What happens when I delete the plugin? =

By default all plugin data is removed. Enable **Keep languages, settings, and alternate URLs if the plugin is deleted** in Settings if you want to preserve them.

== Screenshots ==

1. Frontend language switcher dropdown on a post.
2. Languages screen — add languages, flags, default URLs, and reorder the list.
3. Appearance designer with live preview and a copyable shortcode.
4. Settings for hreflang, JSON-LD, switcher visibility, and uninstall behavior.
5. Help screen with shortcode, block, and PHP usage.

== Changelog ==

= 1.1.2 =
* Updated the directory title and plugin homepage URL.

= 1.1.1 =
* Distinctive Slim Language Switcher name and slug.
* Hardened HTML escaping for switcher and flag output.

= 1.0.0 =
* Initial release.

== Developer Notes ==

Render the switcher in a theme:

`echo slim_language_switcher_get_switcher( array( 'layout' => 'dropdown', 'theme' => 'auto' ) );`

CSS custom properties used by the switcher:

* `--mlmgr-bg`
* `--mlmgr-text`
* `--mlmgr-border`
* `--mlmgr-hover-bg`
* `--mlmgr-hover-text`
* `--mlmgr-accent`
* `--mlmgr-radius`
* `--mlmgr-font-size`

Post and term meta key for alternate URLs: `_slim_language_switcher_urls`.
