Complete Example

Translation DTO

// project-translations.dto.ts
export class ProjectTranslationsDto {
  @ApiProperty({ type: 'string' })
  @IsString()
  id: string;

  @ApiProperty({ type: 'string' })
  @IsString()
  title: string;

  @ApiProperty({ type: 'string' })
  @IsString()
  locale: string;

  @ApiProperty({ type: 'string' })
  @IsString()
  overview: string | null;
}

Main DTO

In this example both title and overview properties will be translated from the ProjectTranslationsDTO

Last updated