I am native Swedish speaker and I have a problem that the language seems to have no grammar in some cases. For instance there is both "en lag" and "ett lag" meaning completely different things but the word "lag" is the same sound and same spelling, but the difference is in the meaning of the word. So you can't know from just the word "lag" whether it is "ett lag" or "en lag".
It seems completely arbitrary whether you should say "en lag" or "ett lag" but the meanings are different.
It seems like there is no logic there or at least something I never saw in other languages i.e. the meaning of the word determines the case. It is the same difference in English in "an" or "a" and there it is the sound of the word which determines the case.
In all other cases besides Swedish, you can know from the word itself what the gender or case should be e.g. English has "a" or "an", German has "der", "die", "das" with very distinct clear rules so that you know, given a word, how to write the definite article.