By the time you're ready to write a paper, you should be intimately familiar with the format and style of the journal you intend to publish in. That's because in order to be ready to write a paper, you need to be reading papers - a lot of them.
That said I think just about all graduate students should take advantage of workshops, courses, resources etc. on academic writing, because writing is a critical skill for someone hoping to do well in academia. I know - a person's scientific achievements should stand on the merit of the work itself. But the fact of the matter is that if you struggle to communicate your ideas, if people find your papers challenging to understand because of the writing, it will be a challenge to get it published at all, and when it gets published it won't get the attention it warrants.
What recommendations would you give to an undergraduate student to prepare himself to publish papers by the time he reaches graduate school ?
Because there is a number of courses, I suppose that it is possible to find also something also on internet, maybe even specialized for physics.
Is it still something on internet?
It would be useful some option of google translate only for science writing. But this is for future.