"She is wearing a scarf instead of a hat."
Translation:Hun har på seg et skjerf i stedet for en hatt.
Notwithstanding the fact that certain nouns name things that we recognize as being masculine (en mann); feminine (ei jente) and neuter (et bord); it is not the item named that determines whether the naming word is masculine, feminine or neuter; it is the word itself that is gender specific. For example, we do not consider the sun itself as being masculine, feminine or neuter. But, in Norwegian, the word "sol" has a gender. In some dialects "sol" is a feminine word and therefore "the sun" is "sola". In other dialects, those that have only a common gender and a neuter gender, the word "sol" is a common gender word and "the sun" is represented as "solen".
Although there are a few patterns that can be used to determine the gender of a word, those patterns don't provide much help so it is necessary to memorize the gender of all nouns, realizing that in some dialects there are only common gender and neuter gender words, while in others the previously referenced common gender words are divided into masculine and feminine gender words.
The memorization task can be made somewhat less burdensome by treating all masculine and feminine words as common gender words and by being focused on learning which words are not common gender words, i.e., which words are neuter gender, and treating all words other than those neuter gender words as being common gender words. If you interact primarily with people whose dialect distinguishes between masculine and feminine, with time, your internal language monitor will cause you to realize that everyone with whom you are talking says, "ei sol" and "sola" and you will begin says those words as replacements for "en sol" and "solen" but until that happens, your speech won't often be wrong even though it might be different from your associates' norm.
There are some exceptions, however. Certain fairly frequently used words, always require a feminine definite article even though they are used with a common gender indefinite article. For example "en bygd" is commonly used in place of "ei bygd", only "bygda" can be used for the definite article and noun. Also, while "en jente" is commonly used, only "jenta" may be used to express the definite article. So, it is also necessary to memorize those exceptions.
Some of the above-reference exceptions, which are primarily holdovers from the 1938 language reformation, are: en fjær/ fjæra; fjære/ fjæra; en greie/ greia; en hytte/ hytta; en kone/ kona; en ku/ kua; en lomme/ lomma; en moro/ moroa; en pumpe’ pumpa; and, en øy/ øya.