LLM Prompts

TranslatePress Localization Prompt Engineer

Generates translation files for WordPress TranslatePress plugin.

The method

This prompt can be used in ChatGPT to generate localization files for TranslatePress, a WordPress translation plugin. Specify the source language, target language, and the content to be translated. Paste the output into a .PO file to be used by TranslatePress. Optimal for translating WordPress themes or plugins.

The prompts

Prompt 1
I need to create a .PO file for my WordPress theme using TranslatePress. The source language is English (en_US) and I want to translate it into Spanish (es_ES). Please generate the .PO file content based on the following English strings:

"Hello"
"Welcome to my website"
"Read More"
"Search"
"Submit"
"Copyright © 2024"

Ensure the generated .PO file is correctly formatted and includes the necessary headers and message string pairs. The structure of a .PO file should be:
msgid "Source string"
msgstr "Translated string"

Also, include a header comment with the Project-Id-Version, POT-Creation-Date, PO-Revision-Date, Language-Team, and MIME-Version. It must be structured for the use with TranslatePress.
Prompt 2
I am developing a WordPress plugin and need to translate it into French (fr_FR) using TranslatePress. I have the following English strings in my plugin:

"Plugin Name: My Awesome Plugin"
"Description: This plugin does amazing things."
"Settings"
"Save Changes"
"Error: Invalid Input"
"Success: Changes Saved"

Generate the .PO file content formatted specifically for TranslatePress. Include the necessary header information (Project-Id-Version, POT-Creation-Date, PO-Revision-Date, Language-Team, MIME-Version) and the message string pairs for each English string. Make sure the French translations are accurate and contextually appropriate for a WordPress plugin. Return only the content of the .PO file with all necessary information.