=== Lipyantar Slugs ===
Contributors: rahultank
Tags: slug, permalink, transliteration, gujarati, hindi
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Readable Latin URLs and file names for Gujarati, Hindi and Marathi content, such as gujarati-samachar instead of percent-encoded text.

== Description ==

When a post title is written in Gujarati or Devanagari, WordPress builds its URL from percent-encoded bytes. "ગુજરાતી સમાચાર" becomes `%e0%aa%97%e0%ab%81%e0%aa%9c...`, which is long, hard to read and awkward to share.

Lipyantar Slugs transliterates these letters into Latin while the slug is created ("lipyantar" means transliteration in Gujarati and Hindi):

* ગુજરાતી સમાચાર → `gujarati-samachar`
* નવરાત્રી ૨૦૨૬ → `navratri-2026`
* हिंदी समाचार → `hindi-samachar`
* प्रधानमंत्री → `pradhanmantri`
* गणपती बाप्पा मोरया → `ganpati-bappa-morya`

It works for:

* Post, page and custom post type slugs
* Category, tag and custom taxonomy term slugs
* Names of uploaded media files

Supported scripts in this version: Gujarati and Devanagari (Hindi, Marathi and other languages written in Devanagari).

The plugin has no settings. Activate it and new slugs are created in Latin.

= How it works =

The letters are converted by rules, not by a word list, so any word is handled. The hidden "a" of a consonant is dropped where it is not pronounced (navratri, garba), and Gujarati and Devanagari digits become 0–9. A short built-in list fixes a few common words that the rules would spell differently, such as gujarati and vadodara.

Nothing is sent to any external service and nothing is stored in the database.

= Existing URLs are not changed =

Only new slugs are affected. Slugs that already exist keep working, and a slug you type yourself in Latin letters is left as it is. To give an existing post a Latin slug, clear its URL slug and save the post again.

= For developers =

Add or change whole-word spellings with the `lipyantar_slugs_exceptions` filter:

`add_filter( 'lipyantar_slugs_exceptions', function ( $words ) {
	$words['સુરત'] = 'surat';
	return $words;
} );`

== Installation ==

1. Upload the `lipyantar-slugs` folder to `/wp-content/plugins/`, or install it from the Plugins screen.
2. Activate the plugin.
3. Write a post with a Gujarati, Hindi or Marathi title. The slug is created in Latin.

== Frequently Asked Questions ==

= Will my old links break? =

No. Existing slugs are not changed.

= A word is spelled differently from how I would write it. What can I do? =

Edit the slug of that post as usual, or add the word with the `lipyantar_slugs_exceptions` filter.

= Does it translate the title? =

No. It transliterates: the words stay the same, only the letters change.

= Which languages are supported? =

Gujarati and languages written in Devanagari, such as Hindi and Marathi. Other Indian scripts may be added in future versions.

== Changelog ==

= 1.0.0 =
* First release.
