The ones here in the UK have these little plastic connectors on the string. The switch itself has a very short string coming out of it(<10cm), the plastic connector and then the main pull cord. These connectors are simple tubes with an opening that hold and hide the knots. Makes changing the pull cord quite easy, you just feed it through the hole in the connector, tie a simple knot at the end and pull it back into the connector body.
I actually had one of these connectors break on a bathroom light and just 3D printed a new one. But it should be fairly trivial to add one of these to any light pull you already have.
https://www.thingiverse.com/thing:5140505 (not my design)
Yeah, for some reason the knot broke on the inside rather than at that connector.