# Code snippets

The main code snippet to enable BabelShark translation is available at your project page:

<figure><img src="https://1290550914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUf86Tx3GrUXukSHhL9ht%2Fuploads%2FACgyouQIVDbIOUMvmggL%2Fimage.png?alt=media&#x26;token=66bbcb10-8a09-4019-b80e-f45c11d39b9d" alt=""><figcaption></figcaption></figure>

Adding this code snippet initiates the loading of BabelShark code, its API and project settings. If current user has a translation language selected, the project will seamlessly switch to that language.

## Language drop-down

If you want to display a built-in language selection drop-down, add `.bs-activator` element to the required position:

```html
<span class="bs-activator" data-drop="auto"></span>
```

This will render a language selector:

<figure><img src="https://1290550914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUf86Tx3GrUXukSHhL9ht%2Fuploads%2FsqAoJwc6dpzZ7Xj4J6MI%2Fimage.png?alt=media&#x26;token=f148f49c-098e-46b6-8bd0-dd949bae9346" alt=""><figcaption></figcaption></figure>

[Read more](https://docs.babelshark.net/dev/api-reference/language-drop-down-specs) about language drop-down configuration and parameters.


---

# 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://docs.babelshark.net/babelshark-basics/code-snippets.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.
