I recently had to work on a website that had to be fully localized and was having trouble figuring out how to link to "single" sections

I usually hardcode links to singles for sites that only use one language, however, in this project the slugs were also localizable, which meant I had to have a reliable way to link to a page without it breaking cross-locale.

And here is what I did when I needed a link to a single that would work in any language.