Skip to main content
Glama

add_language

Add a new language to your translation project by specifying its code (e.g., 'en', 'de', 'fr') to expand multilingual content management.

Instructions

Add a new language to the project. Provide the language code (e.g., 'en', 'de', 'fr').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNo
languageYes

Implementation Reference

  • The inline handler function for the 'add_language' tool. It resolves the project ID, calls the POEditor 'languages/add' API endpoint with the language code, and returns the API response as formatted JSON.
    async (args) => { const id = requireProjectId(args.project_id ?? null); const res = await poeditor("languages/add", { id: String(id), language: args.language }); return { content: [{ type: "text", text: JSON.stringify(res.result ?? {}, null, 2) }] }; }
  • Zod input schema for the 'add_language' tool, defining optional project_id (number) and required language (string, min length 2).
    const AddLanguageInput = z.object({ project_id: z.number().int().positive().optional(), language: z.string().min(2) });
  • src/server.ts:307-316 (registration)
    Registration of the 'add_language' tool via server.tool(), specifying the name, description, input schema (AddLanguageInput.shape), and inline handler function.
    server.tool( "add_language", "Add a new language to the project. Provide the language code (e.g., 'en', 'de', 'fr').", AddLanguageInput.shape, async (args) => { const id = requireProjectId(args.project_id ?? null); const res = await poeditor("languages/add", { id: String(id), language: args.language }); return { content: [{ type: "text", text: JSON.stringify(res.result ?? {}, null, 2) }] }; } );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ryan-shaw/poeditor-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server