# lang

{lang }function is basically used to display phrases such as User doesnt exist. It helps make Clip Bucket Multilingual.

**Usage**

```
{lang code='var_code'}
```

**Examples**

**Example 1**

```
{lang code='usr_exist_err'}
```

Above code will print ‘User doesnot Exist’.

**Example 2**

There are some phrases which uses ‘[sprint\_f](http://php.net/manual/en/function.sprintf.php)‘ modifier to assign values on-fly. With these phrases lang function is used a little differently.

```
{lang code="user_commented_time"}
```

This will print ‘%s commented %s’. This makes no sense. So we will assign this value to a variable.

```
{lang code="user_commented_time" assign="comment_string"}
```

Now it is stored in variable called {$comment\_string}. We will now use ‘sprintf’ modifier to assign values one by one.

```
{$comment_string|sprintf:'http://test.com':'Username','3 weeks ago'}
```

This will print: [Username](http://test.com/) commented 3 weeks ago.

Complete list of phrases with respective codes can be found here

![](https://clipbucket.com/docs/wp-content/plugins/wp-postratings/images/loading.gif)Loading...


---

# 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.clipbucket.com/guides/functions/lang.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.
