Title: Translation_Entry::merge_with
Published: April 25, 2014
Last modified: August 20, 2026

---

# Translation_Entry::merge_with( Translation_Entry $other )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/classes/translation_entry/merge_with/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/classes/translation_entry/merge_with/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/classes/translation_entry/merge_with/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/translation_entry/merge_with/?output_format=md#wp--skip-link--target)

Merges another translation entry with the current one.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/translation_entry/merge_with/?output_format=md#parameters)󠁿

 `$other`[Translation_Entry](https://developer.wordpress.org/reference/classes/translation_entry/)
required

Other translation entry.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/translation_entry/merge_with/?output_format=md#source)󠁿

    ```php
    public function merge_with( &$other ) {
    	$this->flags      = array_unique( array_merge( $this->flags, $other->flags ) );
    	$this->references = array_unique( array_merge( $this->references, $other->references ) );
    	if ( $this->extracted_comments !== $other->extracted_comments ) {
    		$this->extracted_comments .= $other->extracted_comments;
    	}
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/pomo/entry.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/pomo/entry.php#L117)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/pomo/entry.php#L117-L123)

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/translation_entry/merge_with/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.8.0](https://developer.wordpress.org/reference/since/2.8.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Ftranslation_entry%2Fmerge_with%2F)
before being able to contribute a note or feedback.