”Före” is a preposition whereas ”innan” is a conjunction or a preposition. So if you have a clause afterwards (vi äter), you’d use ”innan”, if you just have an object, let’s say ”maten” (the food). You can have either. In Finland Swedish however, it is also common to use ”före” as a conjunction as in your example. Traditionally, ”innan” was only allowed as a conjunction, but now both usages are accepted.
I have a good question : in this sentence, the subject is repeated 2 times. In french, it would be possible to say "Nous dormons avant de manger". Is it possible to say it in the same way in swedish, like : "Vi sover innan äter" without including the subject 2 times? (I know it doesn't translate literraly but it would have the same meaning).
Yes, that's a good question, and the answer is that you can't skip the subject the second time in Swedish. New clause, new subject :)
If you were to use a preposition and a noun instead, you wouldn't get a new clause and you wouldn't need a new subject: Vi sover före/innan maten. literally 'We sleep before the food'.
If I wanted to say, "I sleep before eating" would it also be translated as "Jag sover innan jag äter" ?
Or, another example: I don't eat before swimming: "Jag äter inte innan jag simmar" ?
Very late answer but I'll give it a shot. There's a pretty big difference in meaning. inför doesn't work here for instance. It can be translated as 'before' in phrases like inför rätta 'before the court' – att ställas inför rätta is 'to be put on trial'. There's a sort of meaning more like in front of here.
inför publik means 'in public' or 'in front of an audience'
The reason for this is as follows: innan is a subordinating conjunction, so it starts a subclause. In subclauses, you have the subject first, the verb after, and if there's an inte, it goes before the verb.
The idea of 'inversion' is not a good way of thinking of Swedish word order, since the main rule – for main clauses that are not questions – is that the verb is in second place (this covers most sentences). The subject may be before or after, it's just that the verb is stuck where it is (in a main clause). So the word order is never really inverted – you can get the same order in a main clause and a subclause, but for different reasons.
There's a small list of coordinating/subordinating conjunctions on this page: http://ruotsinkielenblogini.blogspot.se/2010_11_01_archive.html (search for Konjunktioner).
I wrote a longer post on Swedish word order here: https://www.duolingo.com/comment/8970470