Translating php files

Hello,

Can you advise how I could translate php files such as this one in such a way that Trados deals with the tags and that I get on and translate only the text such as 'Erreur de clé API'.

Many thanks, in advance

<?php

$lang['api_key_error'] = 'Erreur de clé API';
$lang['api_key_error_p'] = 'Erreur de clé API : %s';
$lang['api_method_error'] = 'Erreur de méthode';
$lang['api_unknown'] = 'Erreur de méthode';
$lang['api_compute_error'] = 'Erreur de calcul de produit';
$lang['api_typelivraison_error'] = 'Erreur de type de livraison';
$lang['api_adresselivraison_error'] = 'Erreur d\'adresse de livraison';
$lang['api_redirect_unknown'] = 'Erreur, redirection inconnue';
$lang['api_input_error'] = 'Input error : %s';

Parents Reply
  • First, you should use a typographic apostroph in French.

    Second, it seems, that you should create a special file type for your php, where parts '...' => ' will be made untranslatable. Usint the regex text file type the opening pattern here would be ^'.+?' => ' and the closing pattern ',
    This way when opening the file only "Time limit for complete" would be visible and nothing within this segment would break any phrases.

    _________________________________________________________

    When asking for help here, please be as accurate as possible. Please always remember to give the exact version of product used and all possible error messages received. The better you describe your problem, the better help you will get.

    Want to learn more about Trados Studio? Visit the Community Hub. Have a good idea to make Trados Studio better? Publish it here.

Children
No Data