Localizing nested paths?

I see on https://middlemanapp.com/advanced/localization/#localizing-paths that you can localize a URL for a file in the top level of your site. However, say I have the following:

localizable/
 |- some/
 |   |- file.en.html
 |   +- file.es.html
 +- another/
     |- file.en.html
     +- file.es.html

I’m not seeing how to specify these nested paths in the en.yml and es.yml locale files. I’ve tried a few different combinations in these files but with no results. Is it possible to specify locale paths for nested files such as these?

(I realize I could just use a translated URL to begin with. However, I’m thinking I’d like a language switcher on each page and would assume this could be more easily done if all the source files were consistently named. Maybe I’m wrong?)

I realized this can be handled through the localized paths feature. For the sample file structure above, you can have this in the es.yml locale file:

es:
  paths:
    some: algo
    another: otro
    file: archivo

I didn’t realize that the translations also applied to directories.

(And I don’t speak Spanish, so I’m hoping those are the right Google Translate terms :slight_smile: )