To localize astrology readings into Indic languages with the Vedika API, send a language parameter on POST /api/v1/astrology/query (for example "hi" for Hindi or "ta" for Tamil). The reading is generated natively in that language rather than machine-translated from English, while the underlying chart math stays identical across all 30 supported languages. This guide walks through the request shape, the native-generation versus translation trade-off, script and font handling, transliteration of technical terms, caching, and how to verify quality.
Why localization is harder for astrology than for most content
Astrology text is unusually dense with domain terminology: planet names, sign and house names, dasha periods, yogas, nakshatras, and classical citations. A generic translation pipeline that treats the reading as ordinary prose tends to produce three recurring failures.
- Term drift. A word like "house" gets translated as a building, or "Mars" loses its astrological identity (Mangal / Kuja / Sevvai depending on the language).
- Register mismatch. A reading translated literally reads like a manual, not like guidance a person would actually want to read in their own language.
- Citation corruption. When a reading references a classical source, a translator can mangle the attribution, which is exactly where accuracy matters most.
For these reasons the cleaner approach is to generate the narrative in the target language from the start, rather than translate an English draft after the fact.
Native generation versus translation
There are two ways to deliver a reading in Hindi, Tamil, or Bengali, and they are not equivalent.
| Approach | How it works | Trade-offs |
|---|---|---|
| Translate-after | Generate the reading in English, then pass it through a translation step. | Extra latency and an extra failure point; terminology and tone degrade; citations can break. |
| Native generation | The reading is produced directly in the requested language from the computed chart facts. | Terminology, register, and citations stay coherent; one round-trip instead of two. |
The Vedika API uses native generation for its supported languages, including the 14 Indic languages, so the language you request is the language the reading is composed in. The astronomical layer is shared: the same computed positions feed every language, which is what keeps a Hindi reading and an English reading of the same chart factually consistent.
What stays constant across languages
The chart itself never changes with language. Planetary longitudes, ascendant and house cusps, divisional charts, dasha timelines, and yoga detection are computed by the XALEN Ephemeris engine, Vedika's own open-source engine validated against reference astronomical data to within sub-arcminute precision. Localization touches only the narrative and the labels. If you request the same birth details in five languages, the numbers underneath are byte-for-byte the same; only the words differ.
Making a localized request
The AI query endpoint accepts a question, birth details, and a language. Birth details use a nested object with datetime, latitude, longitude, and timezone.
curl -X POST https://api.vedika.io/api/v1/astrology/query \
-H "x-api-key: vk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"question": "What does my career look like this year?",
"language": "hi",
"birthDetails": {
"datetime": "1990-05-15T08:30:00",
"latitude": 28.6139,
"longitude": 77.2090,
"timezone": "Asia/Kolkata"
}
}'
The response narrative comes back in Hindi (Devanagari), with sign, planet, and house names rendered in the conventions of that language. Switch "language" to "ta", "bn", "te", or any other supported code to get the same chart explained in that language.
A reusable client helper
If you serve users in several languages, wrap the call so language is just a parameter. The example below uses a generic HTTP client and an environment-supplied key.
async function getReading({ question, language, birth }) {
const res = await fetch("https://api.vedika.io/api/v1/astrology/query", {
method: "POST",
headers: {
"x-api-key": process.env.VEDIKA_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ question, language, birthDetails: birth }),
});
if (!res.ok) throw new Error(`Reading failed: ${res.status}`);
return res.json();
}
// Same chart, two languages
const birth = {
datetime: "1990-05-15T08:30:00",
latitude: 28.6139,
longitude: 77.2090,
timezone: "Asia/Kolkata",
};
const hi = await getReading({ question: "Career this year?", language: "hi", birth });
const ta = await getReading({ question: "Career this year?", language: "ta", birth });
For long readings, prefer the streaming variant POST /api/v1/astrology/query/stream (Server-Sent Events) so localized text renders progressively instead of making the user wait for the full paragraph. The language behavior is identical; only the transport differs.
Script and rendering: the part that actually breaks
Most "the Hindi text is broken" bug reports are not API problems. They are encoding or font issues in the consuming application. Indic scripts use combining characters, conjuncts, and reordering that a careless pipeline will corrupt. Get these four things right and rendering problems mostly disappear.
- UTF-8 end to end. Set
Content-Type: application/json; charset=utf-8, decode the response as UTF-8, and never pass the bytes through a Latin-1 step. - UTF-8 storage. If you persist readings, use a column type that stores the full Unicode range (for example
utf8mb4in MySQL or a UTF-8 text column in Postgres). The older 3-byte "utf8" in some databases silently truncates. - The right
langattribute. Tag the rendering element, for example<div lang="hi">orlang="ta", so the browser and screen readers pick correct shaping and line-breaking. - A font that covers the script. A font missing Tamil or Odia glyphs renders boxes regardless of correct bytes. Ship a webfont that covers your target scripts.
Transliteration of technical terms
Some applications want a Latin-script transliteration alongside or instead of native script, for example a user who speaks Hindi but reads Roman text more comfortably. Decide this at the product level and request the language that matches: native script for an audience that reads it, a romanized variant where you offer one. Keep the mapping of technical terms stable across your UI: if your interface labels a planet "Mangal" in one place, do not let it become "Mars" two screens later. Consistency of terminology is a localization decision your app owns, not something to leave to chance per request.
Caching localized responses
Localization multiplies your cache key space. The same chart and the same question in three languages are three distinct responses, so language must be part of the cache key.
- Key on a normalized tuple:
(question_intent, birth_hash, language, system). Droppinglanguagefrom the key is a common bug that serves Hindi text to a Tamil request. - Normalize birth details before hashing (round coordinates, canonicalize the timezone) so trivially different inputs hit the same cache entry.
- Because the chart math is identical across languages, you can compute the chart once and only the narrative differs per language. If you call the computation endpoints under
/v2/astrology/*directly, cache the numeric chart aggressively and treat language as a presentation concern layered on top.
The /v2/astrology/* endpoints take flat parameters (datetime, latitude, longitude, timezone) and return computed data you can render in any language yourself, which is useful when you want full control over the wording.
Verifying localization quality
Treat localized output like any other contract you depend on and test it.
- Script-purity check. Assert that a Hindi response contains Devanagari code points and is not silently falling back to English. A quick regex over the Unicode block for the target script catches fallbacks early.
- Factual parity check. Request the same chart in English and the target language and confirm the key facts (ascendant sign, a named dasha lord, a flagged yoga) match. Since the math is shared, any divergence is a rendering bug, not an astronomy bug.
- Citation integrity. Where a reading attributes a claim to a classical source such as Brihat Parashara Hora Shastra or Phaladeepika, confirm the attribution survives localization intact.
- Snapshot a sample set. Keep a few golden charts and review their localized output when you change anything, so regressions surface before users do.
You can run all of these against the free sandbox before spending a single paid query. The sandbox needs no key and returns realistic shapes for every supported language.
Key facts
- The Vedika API supports 30 languages, including 14 Indic languages (Hindi, Bengali, Tamil, Telugu, Kannada, Malayalam, Marathi, Gujarati, Punjabi, Odia, Assamese, and more), each in native script.
- Readings are generated natively in the requested language, not machine-translated from English.
- Chart calculations are identical across all languages; only the narrative and labels are localized.
- Set the language via the
languageparameter onPOST /api/v1/astrology/query; stream long readings with/api/v1/astrology/query/stream. - Computation endpoints live under
/v2/astrology/*with flatdatetime/latitude/longitude/timezoneparameters. - Three astrology systems (Vedic sidereal, Western tropical, KP) are available through one API, all localizable.
- Authentication uses
x-api-key: vk_live_*; the base URL ishttps://api.vedika.io. - Most rendering issues are UTF-8 or font-coverage problems in the client, not API problems.
Where to go next
Preview localized output for your own birth charts in the free sandbox, check the full request and response shapes in the API docs, and review plans (Starter $12/mo through Enterprise $240/mo, with per-query usage from $0.01) on the pricing page. If you are building an assistant or agent integration, the same localization parameter flows through there too.
Frequently asked questions
How do I get an astrology reading in Hindi instead of English? Send a language parameter such as "hi" on POST /api/v1/astrology/query; the reading is generated natively in that language.
Are chart calculations affected by the language I request? No. Positions, houses, dashas, and yogas are computed once and shared across all languages; only the text changes.
Which scripts and languages are supported? 30 languages including 14 Indic languages, each in its native script.
Should I translate readings myself or request them in the target language? Request them in the target language so terminology and citations stay coherent.
How do I keep Indic text from breaking in my app? Serve and store everything as UTF-8, set the correct lang attribute, and load a font that covers the target script.