I want to post my first project on GitHub for Android. The project is in Russian. so in English language. The code is commented on in Russian, I also want to comment on it in English at least. Tell me how to do it better? How to do it, maybe there are some articles to read? Googled - really did not find anything. Do not write in English after the Russian in brackets ...

  • > Do not write in brackets in English> language comment after Russian ... well, how else? - Gorets
  • 2
    @discord Your edit drastically changes the question, making it impossible to give a specific answer to it. In any language this is impossible, but in JavaDoc it is completely solvable. - ReinRaus
  • Removed any-language - andreymal
  • @ReinRaus In the text of the question "the code is commented," which I perceive as ordinary comments explaining the code, and not exclusively documenting comments intended to generate a reference reference. The most unsubstantiated answer is also not specialized in documenting comments or in a specific language. The same applies to the discussion. Your jawadok specialized response may be useful, but divorced from reality. More details below. - Athari

2 answers 2

If the project is multilingual, then it is commented ONLY in English. Everything.

  • And in all other cases, it is also desirable to use English for commenting and documentation, because it is rarely possible to state in advance that no other language speakers will be involved in the project. - falstaf
  • I don’t know, I commented something like this in code.google.com: // Block for managing the queue and free blocks typedef struct {Q_BLOCK head, * tail, * flist, // list of free blocks received by malloc () .... } DATA_QUEUE; / // The control unit queue and free blocks typedef struct {Q_BLOCK * head, * tail, * flist, // list of free blocks received malloc () ....} DATA_QUEUE; * / And like no one swore. - avp
  • Why so categorical? You can comment in any language, but it is unlikely that such a code will interest anyone other than native speakers of the commentator’s native language. - aryndin
\** * <div class="en">English</div> * <div class="ru">Русский</div> */ class Foo 
  • This is clearly not for [any language] suitable. - Sergio Tulentsev
  • @SergioTulentsev see when the question is changed and when the answer is given. Unfortunately, editing discord completely changes the meaning of the question. As a result, from the exact answer how to do this in JavaDoc we get a question for which you cannot give a specific answer. - ReinRaus
  • Oh, tochnyak. This he, of course, did nothing. - Sergio Tulentsev
  • @SergioTulentsev For my correction, see the comment to the answer. As for this decision, I have no idea how to implement it. First, it concerns only documenting comments. Secondly, it does not scale to a large number of languages, because even with one language, method caps can already exceed all reasonable limits. - Athari
  • @SergioTulentsev Third, and most importantly, these comments will not be supported. The requirement to know one language to understand and update comments turns into a requirement to know two. The question says about open-source. These comments will be guaranteed rotten, and therefore will be more harmful than their complete absence. In general, a crutch for a toad is cool, of course, but absolutely useless. - Athari