Title: MO::make_entry
Published: April 25, 2014
Last modified: August 20, 2026

---

# MO::make_entry( string $original, string $translation ): 󠀁[Translation_Entry](https://developer.wordpress.org/reference/classes/translation_entry/)󠁿

## In this article

 * [Parameters](https://developer.wordpress.org/reference/classes/mo/make_entry/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/classes/mo/make_entry/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/mo/make_entry/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/mo/make_entry/?output_format=md#related)

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

Build a [Translation_Entry](https://developer.wordpress.org/reference/classes/translation_entry/)
from original string and translation strings, found in a MO file

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

 `$original`stringrequired

original string to translate from MO file. Might contain 0x04 as context separator
or 0x00 as singular/plural separator

`$translation`stringrequired

translation string from MO file. Might contain 0x00 as a plural translations separator

## 󠀁[Return](https://developer.wordpress.org/reference/classes/mo/make_entry/?output_format=md#return)󠁿

 [Translation_Entry](https://developer.wordpress.org/reference/classes/translation_entry/)
Entry instance.

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

    ```php
    public function &make_entry( $original, $translation ) {
    	$entry = new Translation_Entry();
    	// Look for context, separated by \4.
    	$parts = explode( "\4", $original );
    	if ( isset( $parts[1] ) ) {
    		$original       = $parts[1];
    		$entry->context = $parts[0];
    	}
    	// Look for plural original.
    	$parts           = explode( "\0", $original );
    	$entry->singular = $parts[0];
    	if ( isset( $parts[1] ) ) {
    		$entry->is_plural = true;
    		$entry->plural    = $parts[1];
    	}
    	// Plural translations are also separated by \0.
    	$entry->translations = explode( "\0", $translation );
    	return $entry;
    }
    ```

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

## 󠀁[Related](https://developer.wordpress.org/reference/classes/mo/make_entry/?output_format=md#related)󠁿

| Uses | Description | 
| [Translation_Entry::__construct()](https://developer.wordpress.org/reference/classes/translation_entry/__construct/)`wp-includes/pomo/entry.php` |  |

| Used by | Description | 
| [MO::import_from_reader()](https://developer.wordpress.org/reference/classes/mo/import_from_reader/)`wp-includes/pomo/mo.php` |  |

## User Contributed Notes

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