This seems to be very badly documented, and while there are many questions similar to this one, none really deals with this exactly, nor seems there to be a solution.
I am on Ubuntu 18.04 LTS using the xfce4 desktop and I normally use UK English, my physical keyboard is UK English.
However I need to write other languages now and then, for this reason, I use UK English (dead keys) for languages with accents and umlauts.
I was also able to get Farsi (Persian) to work: just choose Keyboard Preferences - Layouts, hit the +Add button and add Persian. When I enable that language the Farsi characters will show up when I type.
In order to see which character appears for which key on my (UK) keyboard I can look at the layout using the "Show Current Layout" function. When I show the "onboard" virtual keyboard, it automatically switches between the UK, UK dead keys and Farsi characters which makes it easier to enter the correct characters.
HOWEVER: when I try to do the same for Korean, nothing works at all. There is a "Korean" option in the same list from which I selected Persian, but choosing it does not change anything and the layout shows latin characters instead of Hangul (Korean characters).
After consulting many pages on the web I got fcitx to run but while the fcitx menu has an option to choose a virtual keyboard and show it, Korean never shows up in the list, even if the Korean input method is selected. I found no way to figure out what the layout of the korean keyboard is and how to enable a Korean virtual keyboard. Enabling Korean/Hangul also works only rarely, the language often changes to English by itself or just by moving the mouse.
When I activate the Korean input method and I get it to work in a window, as soon as the virtual keyboard display is toggled, Korean is deactivated and I am back to Latin (which is also shown in the virtual keyboard). Also while I can type in a terminal, I cannot get it to work in Google Chrome at all.
Am I missing something or is it simply not possible to enter Korean/Hangul using a virtual keyboard using Ubuntu as of 18.04?