It depends on your individual level of skill. With Wing Chun there are only 4 fighting forms and two weapon forms. To memorize the basic movements of all six forms might take you from 6 months to 1 year. It really couldn't be less than six months since one form has 108 movements, and the weapons forms are difficult just to learn without hurting yourself. The actual movements of Wing Chun are actually pretty simple, which is a credit to the learning curve of the art.
Shotokan Karate officially has 27 forms, but 26 is the most common that are taught. While the Wing Chun forms do not contain any moves that a reasonably healthy person could not perform, the Shotokan forms contain movements that can only be done after conditioning and training. So to just memorize each form, assuming you can perform every move from the beginning, would take a little over 2 years. However, more realistically it should take you about 3 1/2 to 5 years.
Most advance forms of martial arts contain forms and movements that stretch human ability to its limits. This is done either as an intense training exercise to keep the fighter healthy and fit, or as an extreme counter to other advanced martial arts moves, so this slows the learning process. Understand, of course, that I have merely listed how long it will take you to memorize all of the movements and duplicate them. This is by no means any measure of mastery or skill. It usually takes about five years of practice on ONE form to say that a person has achieved some "mastery" of that form. I would say it takes about two years of practice per form to develop a high level of skill. This isn't to say that you can't use martial arts in self defense within your first year of learning, but I am pointing out how long until the moves become second nature and you achieve a deeper understanding of them.
16 yrs training in martial arts
3 yrs teaching MA