# Signals

## `translateSignal`

Gets the translated value of a key as a Signal.

```typescript
import { translateSignal } from '@jsverse/transloco';

// Basic usage
text = translateSignal('hello');

// Translating multiple keys
textList = translateSignal(['green', 'blue']);

// With parameters
textVar = translateSignal('hello', { variable: 'world' });

// With specific language
textSpanish = translateSignal('hello', { variable: 'world' }, 'es');

// With scope
textTodosScope = translateSignal('hello', { variable: 'world' }, { scope: 'todos' });

// With dynamic signals
dynamicKey = signal('hello');
dynamicParam = signal({ variable: 'world' });
text = translateSignal(this.dynamicKey, this.dynamicParam);
```

## `translateObjectSignal`

Gets the translated object of a key as a Signal.

```typescript
import { translateObjectSignal } from '@jsverse/transloco';

// Basic usage
object = translateObjectSignal('nested.object');
title = object().title;

// With dynamic signals
dynamicKey = signal('nested.object');
dynamicParam = signal({ variable: 'world' });
object = translateObjectSignal(this.dynamicKey, this.dynamicParam);
```

## Integration with Angular Dependency Injection

Both `translateSignal` and `translateObjectSignal` integrate with Angular's dependency injection system. They can be called within an injection context or with an explicitly provided injector.

When no injector is provided, the functions automatically assert that they are being called within an injection context and use the current injector.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jsverse.gitbook.io/transloco/core-concepts/signals.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
