Basic Usage

This guide covers the fundamental operations and features of Terry Translation.

Getting Started

After installation, you can start using Terry Translation in your project:

import { TerryTranslation } from 'terry-translation'

const terry = new TerryTranslation()

Basic Operations

Translating Text

const result = await terry.translate({
  text: 'Hello, world!',
  from: 'en',
  to: 'es',
})

Working with Files

await terry.translateFile({
  input: './content/en/messages.json',
  from: 'en',
  to: ['es', 'fr', 'zh'],
})

Project Management

Creating a Project

const project = await terry.createProject({
  name: 'My Website',
  sourceLanguage: 'en',
  targetLanguages: ['es', 'fr', 'zh'],
})

Adding Content

await project.addContent({
  key: 'welcome.message',
  text: 'Welcome to our website',
})

Next Steps

To learn more:

  1. Explore Core Features
  2. Learn Best Practices
  3. Check out Advanced Features