---
title: Loading translation service classes from App_Code
related:
  - https://docs.kentico.com/k9/custom-development/loading-custom-classes-from-app_code.md
  - https://docs.kentico.com/k9/custom-development/miscellaneous-custom-development-tasks/developing-custom-translation-services.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

> **Info:** **Kentico EMS required**
>
> Features described on this page require the **Kentico EMS** license.

For translation services defined in the _App\_Code_ folder, you need to ensure that the system loads the appropriate class when calling the given service.

1. Open your Kentico project in Visual Studio.
2. Edit the App\_Code class containing your translation service.
3. Add a using statement for the **CMS** namespace:

   ```csharp

   using CMS;

   ```
4. Add the **RegisterCustomClass** attribute above the class declaration.

   > **Note:** **Warning**
   >
   > The following example loads the sample [machine](https://docs.kentico.com/k9/custom-development/miscellaneous-custom-development-tasks/developing-custom-translation-services/creating-machine-translation-services.md) and [human](https://docs.kentico.com/k9/custom-development/miscellaneous-custom-development-tasks/developing-custom-translation-services/creating-human-translation-services.md) translation providers. An error will occur if you do not have the corresponding classes in your web project. You need to adjust the attribute parameters to match the names of your own custom service classes.

   ```csharp

   [assembly: RegisterCustomClass("SampleMachineTS", typeof(SampleMachineTS))]
   [assembly: RegisterCustomClass("SampleTS", typeof(SampleTS))]

   ```

   The _RegisterCustomClass_ attribute registers custom classes and makes them available in the system. The attribute accepts two parameters:

   - The first parameter is a string identifier representing the name of the class. The name must match the value of the **Service provider - Class** field specified for the given service in the system.
   - The second parameter specifies the type of the class as a **System.Type** object. When a user requests the translation service, the attribute ensures that the system gets an instance of the appropriate class and executes its methods.

You can now create your translation services in the **Translation services** application using the specified App\_Code classes.
