Editing translations
Magic Translate translates your text automatically, but you can change any translation yourself on magictranslate.io. Use it to fix a wrong translation, keep a product name or match the wording of your brand.
Edit a translation
- Open Translations. It lists every text your app has translated, per language.
- Select the language, then click the pencil next to the translation you want to change.
- Edit the text and click Save changes.
Edited translations are marked Edited by you. Your app receives the new text from then on, and editing a translation does not count toward your usage.
To go back to the AI translation, click the reset button next to an edited translation.
Texts with variables (React, Angular, Vue, JavaScript) show placeholders such as {0} where your app puts in a value. Keep every placeholder in your translation, each one as often as in the original. You can move them to wherever the sentence needs them.
Edit one use of a text
An edited translation applies to every place your app shows that text. To translate the same text differently in one place, for example Save on a checkout button, give that place an id:
// React, React SSR and Vue<T id="checkout-save">Save</T>;t('Save', { id: 'checkout-save' });
<!-- Angular --><t id="checkout-save">Save</t><button [title]="'Save' | t: { id: 'checkout-save' }"></button><!-- JavaScript --><t data-t-id="checkout-save">Save</t>
The id gets its own row in Translations, marked with the id, which you edit like any other. Until you do, it shows the translation of its text, including your edit of that text if you made one.
An id stands for itself, not for its text. If you change the text in your code, the row shows the new text and keeps your edited translation. Places that share an id share its translation, so give each place you want to translate differently its own id.
An id belongs to your account, and you edit it separately for each language.
Ids can be up to 128 characters. A blank or longer id is ignored: the client logs an error and translates the text as usual. An id costs nothing extra: its text is translated and counted toward your usage only once, however many ids use it.
When your app shows the change
Apps that translate in the browser show the new text the next time the page loads.
Pages translated on the server, with React SSR, Next.js or Angular prerendering, keep the old text until they are rendered again. To render them again automatically, add a webhook.
Webhooks
Open your account page and add a URL under Webhooks. Every time you save or reset a translation, Magic Translate sends a POST request to each URL with this body:
{ "event": "translations.changed" }
To deploy your site again on Vercel, create a deploy hook in your project settings and add its URL as a webhook. Other hosts, such as Netlify and Render, offer similar build hooks.
Webhook URLs must start with https://. You can add up to 10.