Bihar Police Notebook includes a built-in Hinglish transliteration engine so you can type in the familiar Roman script and see Devanagari suggestions appear as you write. Pressing Space accepts the best suggestion instantly — no separate IME or keyboard layout required.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/arverma/Bihar-Police-Notebook/llms.txt
Use this file to discover all available pages before exploring further.
The Hindi Typing Toggle
The A:अ toggle in the editor header switches transliteration on and off. Its state is remembered inlocalStorage under the key langMode.
- Toggle ON (Hinglish → Hindi)
- Toggle OFF (English / direct Hindi)
Each word you type is sent to the Google Input Tools API as you pause between characters. Up to five Devanagari suggestions appear in a floating popup anchored below the current word.
- Press Space to accept the top suggestion and move to the next word.
- Click any suggestion in the popup to insert that specific alternative.
- Suggestions are cached in memory for the lifetime of the page — re-typing the same Hinglish word never makes a second network request.
How Suggestions Are Fetched
The app calls the Google Input Tools endpoint with the current word anditc=hi-t-i0-und to request Hindi transliteration:
data[1][0][1] and stores them in a plain object cache keyed by the Hinglish word. Subsequent lookups for the same word are served from cache without any network activity.
Words That Are Never Transliterated
TheshouldSkipTransliteration() function checks each word before making an API call and skips it silently in two cases:
| Condition | Example | Behaviour |
|---|---|---|
Pure number (digits, ., ,, -, /) | 164, 2024-06-15, 420/IPC | Kept as typed — no request |
| Contains any uppercase Latin letter (A–Z) | IPC, FIR, Section, CrPC | Kept as typed — no request |
Mobile Devices
On screens 768 px wide or narrower the toggle button is hidden entirely. The internal checkisTransliterationEnabled() returns false whenever the (max-width: 768px) media query matches — no suggestions are requested and no popup is shown.
The transliteration feature requires an active internet connection. If you are offline, turn the toggle OFF so you can continue typing without the app waiting for a network response that will never arrive.
Workflow Example
Turn the toggle ON
Click A:अ in the header. The editor placeholder updates to “यहाँ Hinglish में टाइप करें…”.
Type a Hinglish word
For example, type
prarthna. After a brief 50 ms pause, a popup shows up to five Devanagari options such as प्रार्थना, प्रार्थन, etc.Accept or choose
Press Space to accept the first suggestion (प्रार्थना) and move on, or click a different suggestion to insert it instead.