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?
I just managed to get it! (I've actually yelled "eureka"!) This is for Linux Mind Ullya and I am about to do the same for my Ubuntu 20.04 LTS.
This is how I did:
First Part - Install IBus:
Step 1: Install and set up IBus Open the terminal and run the below command
Step 2: Get the language right On the terminal run the command below hor the Hangul option
Then you need to set it up under language e region settings, choose Korean (Hangul).
Second Part - Configure Onboard:
For that you will need a skin for your virtual keyboard to display Hangul characters. I found one here:
https://forum.ubuntu-kr.org/viewtopic.php?t=15696
Download the tar.gz file and add it to the layout options on Onboard.
If you need further assistance, let me know.