Translation:Please speak Japanese.
Don't quote me on this, but I heard from someone that it is seen as rude to say ください to someone directly. Teachers use it to students because they're in a position of authority, so if you say it to someone else it can seem as if you're ordering them around and are implying that you're in a higher position. So it'd be better to say てもちえませんか if you're a beginner. . . But I could be wrong.
“O negai shimasu” is the kenjōgo (humble polite register) of “nega|u” meaning “wish for” (and euphemistically “ask for”), with the honorific prefix “o” being a roundabout way of indicating that the listener is the object (like here; or, in other situations, the benefactor) of the action.
“Kudasai” is an (irregular fossilized) form of (what would normally be if not for the fossil) “kudasar|u”, one of the verbs for “give”, specifically “give to the speaker, who is of lower (下) social status”. The closest English word is perhaps “bestow”. See <https://en.wikibooks.org/wiki/Japanese/Lessons/Giving_and_Receiving>. These connotations are not to be taken very seriously for “kudasai”, though, as it’s pretty informal.
Of those two, you can ask for objects with either “N wo kudasai” or “N (wo) o negai shimasu”, for actions only with “V-te kudasai”, for means (like here) only with “N de o negai shimasu”, for people (on the phone) only with “N o negai shimasu”, for places (on the taxi) only with “N made o negai shimasu”, and so on depending on the situation. See e.g. <https://japanese.stackexchange.com/q/269/>.
If I remember correctly, there is more to this. The base forms, おねがい and ください, are humble and imperative forms of request, respectively. Typically the length of the ending determines the formality of the request, as in くださいます, or even more formally くださいました. Culturally, I think the level of formality is determined by the occasion, while the level of humility depends on who one is speaking to.
So, literally here you have the words "Japanese" "In" and "Please." There is no verb here. So literally this could be "write"書く or "speak"話す or "think"考える. If we want to accurately translate this it would be best to say "In Japanese, please."
Otherwise we would assume, and that is not good
Japanese really loves to omit "unimportant" part that can be understood by context, in this case it's the verb. Now the verb can be "speak", "write", or any other relevant verb. So why does the sentence translates to "please speak Japanese"? Well, maybe because it's the most common usage of this phrase. If you want to include the verb, use ください instead: 日本語で話してください
You could definitely use either in some situations, but it's not an accurate translation. There's nothing about speaking in the original (could be used for writing too), and if you wanted to ask someone to show off their Japanese skills by saying a few things, you wouldn't just say "in Japanese please" - that would be confusing
Point is you have to be careful you're not adding or removing information and changing the meaning too much when you translate, or you'll get marked down. Just try to translate the sentence or phrase you're given, as accurately as you can