Translation:My foot hurts.
Can also mean my legs hurt, there is no distinction between foot and leg in japanese except for kanji 足 is foot, 脚 is leg
I guess in Japan you hope the doctor doesn't amputate your leg when it just needed to be your foot.
が is mostly used to refer to non-main subject nouns or to expand on things by introducing adjectives. いたい, like すき, is an adjective in japanese, unlike english where both hurt and like are verbs. は is usually used to introduce new topics, but also to ccontrast between things. It also gets used to introduce negatives or contrary concepts to previous statements.
I.e. The speaker may have been asked about, or have listed, a series of body parts that hurt, and the leg is the first mentioned which does not. Also, the speaker may have been asked about their leg/foot due to a limp (it's considered rude to directly mention someonr limping in japan), but the speaker actually has a sore back, so they're saying ''no, it' not my back, but something else'' without so many words.
足が痛いです My feet hurt. (A specific known pair of feet.) 足は痛いです Feet hurt. (As a general statement.)
So how can i know if they mean "foot" or "leg", if "a-shi" means both? (According to duolingo)
But how do you ask for clarification if there's no difference between the words for foot and leg?
By asking, "Where on the leg?" They can then show you or use more specific descriptions like heel, sole, calf, etc. Since pain tends to be fairly specific, it's not as cumbersome as it seems. Also, if you're not talking to a doctor, knowing exactly what part of the leg you're talking about probably isn't the most important part of the conversation. It can often be inferred from context as well.
In certain kanji compounds like 満足(まんぞく) or as a counter of pairs of socks or shoes.
you don't. "足(あし)” can mean both so you ask to "どこが？” ”どの辺が痛いのですか？” to find more details.