# How to not translate specific ajax action

To exclude a specific ajax action from being translated, you can use the following filter in the example below:

```php
// You can replace 'ajax_action_example' with the specific action that you want to exclude
add_filter('weglot_ajax_no_translate', 'custom_ajax_no_translate', 10, 1);
function custom_ajax_no_translate($ajax_action){
	$ajax_action[] = 'ajax_action_example';
	return $ajax_action;
}
```

You can also customize this filter if you want to exclude the translation of the action only on the original version, as shown in the example below:

```php
add_filter('weglot_ajax_no_translate', 'custom_ajax_no_translate', 10, 1);
function custom_ajax_no_translate($ajax_action){
	if( weglot_get_original_language() == weglot_get_current_language()){
		$ajax_action[] = 'ajax_action_example';
	}
	return $ajax_action;
}
```

### Example: Excluding the `'loadmore'` ajax action

```php
add_filter('weglot_ajax_no_translate', 'custom_ajax_no_translate', 10, 1);
function custom_ajax_no_translate($ajax_action){
	$ajax_action[] = 'loadmore';
	return $ajax_action;
}
```

### Example: Excluding the `'et_fb_ajax_save'` ajax action

```php
add_filter('weglot_ajax_no_translate', 'custom_ajax_no_translate', 10, 1);
function custom_ajax_no_translate($ajax_action){
	$ajax_action[] = 'et_fb_ajax_save';
	return $ajax_action;
}
```


---

# 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://developers.weglot.com/wordpress/use-cases/how-to-not-translate-specific-ajax-action.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.
