Translate with code elements

Hi, I’m working on a prompt that will translate content with markdown format inside. For that, I cut my content in smaller pieces and use my prompt on it.
It’s working for most of the parts but sometimes, the result is not translated.

I’ve tried 2 prompts :

Provide a skilled translation of this markdown formatted content from language {$lang_list[$lang_origin]} to language {$lang_list[$lang_target]}
It is crucial that any links formatted as text to translate are preserved, get the url preserved. Maintain correct formatting of markdown elements, ensure proper names and city/country names are not translated. Confirm that translation is accurate and coherent in the target language.

And :

Provide a skilled translation of this markdown formatted content from language Français to language العربية
It is important that any links formatted with markdown are preserved. Maintain correct formatting of markdown elements, ensure proper names and city/country names are not translated. Confirm that translation is accurate and coherent in the target language. Reply only in the target language

But I have the same kind of behaviour for both.
Anyone with an idea ?
Thanks a lot !

1 Like