India alone has 22 official languages, and astrology is deeply rooted in regional cultures. Users prefer receiving predictions in their native language - a Hindi speaker in Delhi expects "राशिफल" not "horoscope", while a Tamil speaker wants "ஜாதகம்" not "kundali".
This guide shows you how to build truly localized astrology applications that speak your users' language - from API integration to UI considerations.
Supported Languages
Vedika API supports 22 languages out of the box:
Indian Languages (11)
International Languages (11)
Português
pt - Portuguese
Basic Implementation
Simple Language Parameter
const hindiResponse = await vedika.query({
question: "What are my career prospects this year?",
birthDetails: birthDetails,
language: 'hi'
});
console.log(hindiResponse.answer);
const tamilResponse = await vedika.query({
question: "What are my career prospects this year?",
birthDetails: birthDetails,
language: 'ta'
});
console.log(tamilResponse.answer);
Note: You can ask questions in any language and receive responses in any language. The API handles translation automatically.
Query in Native Language
const response = await vedika.query({
question: "मेरा करियर कैसा रहेगा?",
birthDetails: birthDetails,
language: 'hi'
});
const tamilQuery = await vedika.query({
question: "என் திருமண வாழ்க்கை எப்படி இருக்கும்?",
birthDetails: birthDetails,
language: 'ta'
});
React Implementation with i18n
Setting Up react-i18next
npm install react-i18next i18next i18next-browser-languagedetector
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import en from './locales/en.json';
import hi from './locales/hi.json';
import ta from './locales/ta.json';
i18n
.use(LanguageDetector)
.use(initReactI18next)
.init({
resources: { en, hi, ta },
fallbackLng: 'en',
interpolation: { escapeValue: false }
});
export default i18n;
Translation Files
{
"app": {
"title": "Cosmic Insights",
"subtitle": "AI-Powered Astrology"
},
"horoscope": {
"daily": "Daily Horoscope",
"weekly": "Weekly Horoscope",
"monthly": "Monthly Horoscope"
},
"signs": {
"aries": "Aries",
"taurus": "Taurus"
}
}
{
"app": {
"title": "ब्रह्मांडीय अंतर्दृष्टि",
"subtitle": "AI-संचालित ज्योतिष"
},
"horoscope": {
"daily": "आज का राशिफल",
"weekly": "साप्ताहिक राशिफल",
"monthly": "मासिक राशिफल"
},
"signs": {
"aries": "मेष",
"taurus": "वृषभ"
}
}
{
"app": {
"title": "அண்ட ஞானம்",
"subtitle": "AI-இயக்கப்படும் ஜோதிடம்"
},
"horoscope": {
"daily": "இன்றைய ராசிபலன்",
"weekly": "வாராந்திர ராசிபலன்",
"monthly": "மாத ராசிபலன்"
},
"signs": {
"aries": "மேஷம்",
"taurus": "ரிஷபம்"
}
}
Language Selector Component
import React from 'react';
import { useTranslation } from 'react-i18next';
const languages = [
{ code: 'en', name: 'English', native: 'English' },
{ code: 'hi', name: 'Hindi', native: 'हिन्दी' },
{ code: 'ta', name: 'Tamil', native: 'தமிழ்' },
{ code: 'te', name: 'Telugu', native: 'తెలుగు' },
{ code: 'bn', name: 'Bengali', native: 'বাংলা' },
{ code: 'kn', name: 'Kannada', native: 'ಕನ್ನಡ' },
{ code: 'ml', name: 'Malayalam', native: 'മലയാളം' },
{ code: 'gu', name: 'Gujarati', native: 'ગુજરાતી' },
{ code: 'mr', name: 'Marathi', native: 'मराठी' },
];
export const LanguageSelector: React.FC = () => {
const { i18n } = useTranslation();
return (
<select
value={i18n.language}
onChange={(e) => i18n.changeLanguage(e.target.value)}
className="px-4 py-2 rounded-lg border border-gray-300"
>
{languages.map((lang) => (
<option key={lang.code} value={lang.code}>
{lang.native} ({lang.name})
</option>
))}
</select>
);
};
Using with Vedika API
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import vedikaClient from '../services/vedikaClient';
export function useAstrology() {
const { i18n } = useTranslation();
const [loading, setLoading] = useState(false);
const getHoroscope = async (question: string, birthDetails: any) => {
setLoading(true);
try {
const response = await vedikaClient.query({
question,
birthDetails,
language: i18n.language
});
return response.answer;
} finally {
setLoading(false);
}
};
return { getHoroscope, loading };
}
Font Considerations
Loading Indic Fonts
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari&family=Noto+Sans+Tamil&family=Noto+Sans+Telugu&family=Noto+Sans+Bengali&display=swap" rel="stylesheet">
body[lang="hi"], body[lang="mr"], body[lang="sa"] {
font-family: 'Noto Sans Devanagari', sans-serif;
}
body[lang="ta"] {
font-family: 'Noto Sans Tamil', sans-serif;
}
body[lang="te"] {
font-family: 'Noto Sans Telugu', sans-serif;
}
body[lang="bn"] {
font-family: 'Noto Sans Bengali', sans-serif;
}
RTL Support for Arabic
useEffect(() => {
const rtlLanguages = ['ar', 'he', 'fa', 'ur'];
const isRTL = rtlLanguages.includes(i18n.language);
document.documentElement.dir = isRTL ? 'rtl' : 'ltr';
document.documentElement.lang = i18n.language;
}, [i18n.language]);
SEO for Multi-Language Apps
<link rel="alternate" hreflang="en" href="https://yourapp.com/en/" />
<link rel="alternate" hreflang="hi" href="https://yourapp.com/hi/" />
<link rel="alternate" hreflang="ta" href="https://yourapp.com/ta/" />
<link rel="alternate" hreflang="x-default" href="https://yourapp.com/" />
Build Multi-Language Astrology Apps
Vedika API supports 22 languages. Get started with 10 free queries.
Get Your API Key
Conclusion
Building multi-language astrology apps is straightforward with Vedika API. Key takeaways:
- Simple language parameter - Just pass the language code
- Automatic translation - Ask in any language, respond in any language
- Native scripts - Full support for Devanagari, Tamil, Telugu, etc.
- RTL support - Arabic and other RTL languages work out of the box
About Vedika Intelligence: We provide the only B2B astrology API with native support for 22 languages, including 11 Indian languages.