> For clean Markdown of any page, append `.md` to the page URL. > For a complete documentation index, see https://docs.sarvam.ai/llms.txt. > For full documentation content in one file, see https://docs.sarvam.ai/llms-full.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server. # How to set style guidelines > Use style_guidelines and language_specific_guidelines to control tone, terminology, and formatting in Sarvam Document Translation output. `style_guidelines` lets you steer tone, terminology, and formatting for the whole job in free text. `language_specific_guidelines` layers per-language overrides on top of it. | Parameter | Type | Notes | | ------------------------------ | ------ | -------------------------------------------------------------------------------------------------------- | | `style_guidelines` | string | Up to \~4000 characters. Applies to every target language in the job. | | `language_specific_guidelines` | object | Keys must match entries in `target_language_codes`. Overrides `style_guidelines` for that language only. | > **Tip** > > Use `style_guidelines` for instructions that should hold across every language, for example "keep product names untranslated." Use `language_specific_guidelines` only when one language needs different handling, such as a regional terminology preference. ## Example #### Python ```python from sarvamai import SarvamAI client = SarvamAI(api_subscription_key="YOUR_SARVAM_API_KEY") job = client.document_translation.create( job_name="employee-handbook-hi-ta", source_language_code="en-IN", target_language_codes=["hi-IN", "ta-IN"], original_filename="employee-handbook.docx", style_guidelines=( "Keep all product names and legal entity names untranslated. " "Use formal register throughout." ), language_specific_guidelines={ "ta-IN": "Prefer commonly used loanwords over invented Tamil equivalents for technical terms.", }, ) ``` #### JavaScript ```javascript import { SarvamAIClient } from "sarvamai"; const client = new SarvamAIClient({ apiSubscriptionKey: "YOUR_SARVAM_API_KEY", }); const job = await client.documentTranslation.create({ job_name: "employee-handbook-hi-ta", source_language_code: "en-IN", target_language_codes: ["hi-IN", "ta-IN"], original_filename: "employee-handbook.docx", style_guidelines: "Keep all product names and legal entity names untranslated. Use formal register throughout.", language_specific_guidelines: { "ta-IN": "Prefer commonly used loanwords over invented Tamil equivalents for technical terms.", }, }); ``` Request body equivalent: ```json { "job_name": "employee-handbook-hi-ta", "source_language_code": "en-IN", "target_language_codes": ["hi-IN", "ta-IN"], "original_filename": "employee-handbook.docx", "style_guidelines": "Keep all product names and legal entity names untranslated. Use formal register throughout.", "language_specific_guidelines": { "ta-IN": "Prefer commonly used loanwords over invented Tamil equivalents for technical terms." } } ``` ## Related * [Document Translation Overview](/api/api-guides-tutorials/doc-translation/overview) * [Use Cases](/api/api-guides-tutorials/doc-translation/use-cases) > Use style_guidelines and language_specific_guidelines to control tone, terminology, and formatting in Sarvam Document Translation output.