> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unlingo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Namespaces

> Organize your translations with namespaces for better structure and maintainability

## What are Namespaces?

**Namespaces** are logical containers within a project that group related translations together. They help organize your translation keys by feature, component, or any other logical division that makes sense for your application.

Think of namespaces as folders in a file system - they provide structure and help prevent naming conflicts while making translations easier to manage.

## Why Use Namespaces?

<CardGroup cols={2}>
  <Card title="Organization" icon="folder-tree">
    Group related translations together for better maintainability
  </Card>

  <Card title="Separation of Concerns" icon="layer-group">
    Isolate different features or components to avoid conflicts
  </Card>

  <Card title="Team Collaboration" icon="users">
    Allow different teams to work on different namespaces independently
  </Card>

  <Card title="Performance" icon="gauge-high">
    Load only the translations you need, reducing bundle size
  </Card>
</CardGroup>

## Namespace Structure

A typical application might use this namespace structure:

```
Project: E-commerce Website
├── common/          # Shared UI elements
│   ├── buttons
│   ├── navigation
│   └── forms
├── product-catalog/ # Product listing and details
│   ├── filters
│   ├── search
│   └── product-card
├── checkout/        # Purchase flow
│   ├── cart
│   ├── payment
│   └── confirmation
└── user-account/    # User profile and settings
    ├── profile
    ├── orders
    └── preferences
```

## Creating Namespaces

### Via Dashboard

<Steps>
  <Step title="Navigate to Project">Go to your project dashboard and select the project you want to work with</Step>
  <Step title="Go to Namespaces Tab">Click on the "Namespaces" tab in your project navigation</Step>
  <Step title="Create New Namespace">Click "Create Namespace" and fill in the details.</Step>
</Steps>

<Info>By default new namespaces are created with `main` version.</Info>

## Namespace Versioning

Each namespace can have different versions, allowing for independent updates.

## Best Practices

### Keep Namespaces Focused

<Warning>
  Avoid creating overly broad namespaces that contain unrelated translations. This makes maintenance difficult and
  reduces the benefits of organization.
</Warning>

#### Good: Focused Namespaces

```
auth/              # Only authentication-related
product-search/    # Only search functionality
user-preferences/  # Only user settings
```

#### Avoid: Overly Broad Namespaces

```
misc/              # Too vague
frontend/          # Too broad
translations/      # Doesn't provide organization
```

## Troubleshooting

<AccordionGroup>
  <Accordion title="Namespace not found error">
    **Verify that:** - The namespace name is spelled correctly - The namespace exists in your project - Your API key
    has access to the namespace - The namespace is included in the current release
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Versions" icon="code-branch" href="/concepts/versions">
    Understand how to version your namespace translations
  </Card>

  <Card title="Releases" icon="rocket" href="/concepts/releases">
    Package namespaces into deployable releases
  </Card>
</CardGroup>
