I'm designing a translation app which will be used to translate other apps. The app will be initially desktop based, but later on I want to make a mobile version as well. The difficulty that I'm facing is that the strings that need to be translated may be "templates" -- pieces of text that with placeholders that will be replaced at runtime with other text or code. For example:
{name} received an {1}award{/1}
We want the translators to translate this into something like
{name} recibió una {1}distinción{/1}
so that at runtime we can replace {name}
with a particular name, and {1}{/1}
will be converted into a hyperlink. In general there may be multiple placeholders in a piece of text (maybe up to a dozen), and the markup tags {1}{/1}
can potentially be nested.
Now, my question is: how do I design the interface where the translators will be submitting their translations? I was thinking of several potential solutions, but each one seems to have its drawbacks:
- Just present them with the raw string as it is stored internally. The obvious drawback is that it is potentially confusing to the translator; and in general doesn't look very nice.
- Show the tokens as colored blobs (having distinct background color) and allow people to drag those blobs around, or enter text directly into them. The drawback is that sometimes the translation requires that those blobs be reordered -- and I want to have the interface be navigatable without the mouse.
- Make the free text entry, and in the end require the translators to "color" the placeholder fragments (they can select text with keyboard and press a shortcut like Ctrl+B).
Which approach should I choose? Are there any better alternatives?
{1} {/1}
pair.