Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 621261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:51:18+00:00 2026-05-13T18:51:18+00:00

I have some code that is written in french, that is the variables, class,

  • 0

I have some code that is written in french, that is the variables, class, function all have french names. The comments are also in french. I’d like to translate the code to english. This will be quite a challenge, since it’s a 18K lines project and I’d like to know if there is any tool that could help me, especially with the variables/class/function names, since it will be error prone to rename them all.

Is there any tools that can help me? Advices?

edit : I’m not looking for machine translation. I’m looking for a tool that would help me translate the code. Let’s say there is class name C and this class has a method named TraverserLaRue and I rename it CrossTheRoad I’d like all references to TraverserLaRue in all files to be translated as CrossTheRoad. However I don’t want the method TraverserLaRue of class B to be translated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T18:51:18+00:00Added an answer on May 13, 2026 at 6:51 pm

    I assume the langauge in question is one of the common ones, such as C, C++, C#, Java, …
    (You don’t have a language with French keywords? I once encountered an entirely Swedish version of Pascal, and I gave up on working that).

    So you have two problems:

    • Translating identifiers in the source code
    • Translating comments

    Since comments contain arbitrary natural language text, you’ll need an arbitrary translation of them. I don’t think you can find an automated tool to do that.

    Unlike others, however, I think you have a decent chance at translating the identifiers
    and changing them en masse.

    SD makes a line of source code “obfuscator” products. These tools don’t process the code as raw text, rather they process the source code in terms of the targeted language; they accurately distinguish identifiers from operators, numbers, comments etc. In particular, they
    operate reliably as need on just the identifiers.

    One of the things these tools do is to replace one identifier name by another (usually a nonsense name) to make the code really hard to understand. Think abstractly of a map of identifier names I -> N. (They do other things, but that’s not interesting here). Because you often want to re-obfuscate a file that has changed, the same way as an original, these tools allow you to reuse a previous cycle’s identifier map, which is represented as list of I -> N pairs.

    I think you can abuse this to do what you want.

    Step 1: Run such an obfuscator on your original French code. This will produce a text file containing all the identifiers in the code as a map of the form

      I1 -> N1
      I2 -> N2
      ....
    

    You don’t care about the Ns, just the I’s.

    Step 2: Manually translate each French I to an English name E you think fits best.
    (I have no specific suggestions about how to do this; some of the other answers here
    have suggestions).
    Some of the I’s are likely to be library calls and are thus already correct.
    You can modify the text obfuscation map file to be:

      I1 -> E1
      I2 -> E2
    

    Step 3: Run the obfuscation tool, and make it use your modified obfuscation map.
    It can be told to do that.

    Viola, all the identifiers in your code will be changed the way you specify.

    [You may get, as a freebie, the re-formatting of your original text. These tools can also format code nicely. Your name changes are likely to screw up the indentation/spacing in the original text so this is a nice bonus].

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some code that raises PropertyChanged events and I would like to be
I have some code that looks like: template<unsigned int A, unsigned int B> int
I have some code that uses the Oracle function add_months to increment a Date
I have some code that was written for Mac OS X and it makes
I have some code written that is attempting to connect to a mysql db.
So I have some code that looks like this: int a[10]; a = arrayGen(a,9);
I have some code that gives a user id to a utility that then
I have some code that uses the shared gateway pattern to implement an inversion
I have some code that generates image of a pie chart. It's a general
I have some code that effectively does this : File file = new File(C:\\Program

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.