Can i translate basics Keyword?

Hello,
I am beginner with robotframework.
My client would like translate the keyword in french … even for the basic KW such as “Get From Dictionnay” from Collections libraries.

My question is : Is there a global library that would translate all basics KW ?
For example : “Get From Dictionnay” → “Obtenir du dictionnaire”, " Should Not Be Empty" → “Ne Doit Pas Etre Vide”, etc …

Thanks you.

1 Like

I’m not aware of any but it wouldn’t be hard for you to create one.

I would suggest you translate one library at a time (this will make maintenance easier),

so starting with builtin you would create keyword files like these:

BuiltInFR.robot:

*** Keywords ***
Méthode D'appel
    [Arguments]    @{varargs}
    Call Method    @{varargs}

Ne Doit Pas Etre Vide
    [Arguments]    @{varargs}
    Should Not Be Empty    @{varargs}

CollectionsFR.robot:

*** Settings ***
Library    Collections

*** Keywords ***
Obtenir du dictionnaire
    [Arguments]    @{varargs}
    Get From Dictionnay    @{varargs}

Then in your test case robot file, you just include those keyword files

exemple_français.robot

*** Settings ***
Resource    BuiltInFR.robot
Resource    CollectionsFR.robot

*** Variables ***
${MESSAGE}        Bonjour le monde!

*** Test Cases ***
Mon Test
    Ne Doit Pas Etre Vide    ${MESSAGE}

Obviously this is not perfect as not everything is in French, but it would get you a long way towards that goal, sorry my French is limited to google translate so hopefully I haven’t made any major mistakes and you can get the idea.

If you think that other French speakers would like this you could start a github or similar project and then they could help you build up a more extensive library of translated keyword files.

Hope this helps,

Dave.

I forgot to mention that you could also create a general import file something like:

mots-clés_français.robot

*** Settings ***
Resource    BuiltInFR.robot
Resource    CollectionsFR.robot

and then exemple_français.robot becomes

*** Settings ***
Resource    mots-clés_français.robot

*** Variables ***
${MESSAGE}        Bonjour le monde!

*** Test Cases ***
Mon Test
    Ne Doit Pas Etre Vide    ${MESSAGE}

which might be a better solution if you are translating a lot of libraries.

Dave.