I need to write both in French and English in my document (for reasons).

And I need to write algorithms in both languages, using the algorithmic package.

Is it possible ?

If so, how can I do that ?

My setup is simple to include these



and I write algorithms like this:




I haven't specified anything about language in my document. So it's in English by default.

  • 1
    Yes. Why would it not be a problem? What's your current setup? You could create two different environments, one for a French algorithm, and one for an English algorithm, and set the languages accordingly. But without much more information, "Yes" is the answer here.
    – Werner
    Jan 14, 2016 at 21:53
  • OK, this wasn't really intended to be a Yes/No question. Question is edited. Jan 14, 2016 at 22:19

1 Answer 1


The algorithms bundle provides the user with the flexibility to change things to suit their needs, albeit somewhat manually. To that end, I suggest creating a language-specific environment to manage the languages you're using, say frenchalgorithm and englishalgorithm:

enter image description here




     % Set other language requirements
     % Set other language requirements



  \caption{An algorithm}
    \STATE This is a statement
      \STATE This is another statement

  \caption{Another algorithm}
    \STATE This is a statement
      \STATE This is another statement



You'd have to define each of the translated keywords manually. The same would go if you were using the algorithmicx package.

More about the above changes is briefly discussed in sections 3.14.3 Customization and 4.4 Customization of the algorithms documentation. I don't speak French...


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .