I use a workaround which in itself is not dependent on Dash, but for that very reason can be used with Dash or any launcher - like Synapse, but also launchers specific to each desktop like Xfce, KDE etc.
The idea is to create layout-specific desktop-files and put them in
/usr/share/applications, so that they can be launched like any other application.
The launcher sees them as applications, each selecting a specific keyboard layout.
The command executed by each such launcher should be a
setxkbmap command, which has the following form:
For example, for French it should be
setxkbmap fr. For US International with dead keys:
setxkbmap us intl, where
us is US English and
intl is the variant.
To see the proper forms of layouts and variants, look in
Each desktop file should be created by opening a text editor, putting inside lines similar to the below and saving the file with a name similar to
keyboard_US-deadkeys.desktop, etc. (The name of the
.desktop file may be different than the one set in the line
Name=. The later is the one seen by the launcher.)
Name=US - Keyboard US International dead Keys
Exec=setxkbmap us intl
So, create a desktop file for each keyboard layout that you need, changing accordingly the name, command variables and icons.
Pay attention to the first letters of the line
Name= because Dash and any launcher will find according to the beginning of the name. You may choose to start with a short-name of the layout (FR for French, US for US English, etc) or with a common form like Keyboard to see them all together.
Icon= is also a useful line, to display it all better. You may find country flags or letters ready made icons on the internet by searching "icons flags" or "icons letters". (Or use Shutter to create your own png icons by selecting a monochrome field and writing on that the short-name of the layout etc.)
On Synapse - here.