I’m trying to set up translation for a website that I’ve built using MkDocs. A part of MkDocs is the inclusion of .nav.yml files for navigation, which uniquely need the keys translated rather than the values.
How can I get Crowdin to recognize that I need the keys translated?! I’m importing through Github right now and I’ve failed to wrap my head around it. I tried to set up what another user did, editing the crowdin.yml file to somehow change .yml files to .txt, but it didn’t work. Any help would be greatly appreciated.
The core issue is that Crowdin treats YAML keys as static identifiers and only makes values translatable, so for .nav.yml files where the keys are the actual navigation labels, the standard YAML parser simply won’t pick them up.
The fix could be to tell Crowdin to treat the file as plain text using the dest and type parameters. This makes Crowdin import the file line by line, which means everything becomes translatable, including the nav labels.
At first, I was disappointed that it didn’t work… But suddenly, after I put that chunk of configs above my preexisting ones, it works! I can now edit the .nav.yml file as if it were .txt and export it to .nav.yml! Thanks so much!
(I did have to slightly change the code, since I use a folder-based localization system, where my source files are in /docs/en/ and my translations are in /docs/xx/. Just saying in case someone else stumbles across this!)
Also, thank you for sharing the adjustment you made for your folder-based localization system. Detailing how you routed your source files and translations is incredibly helpful for other users who might stumble across this thread with a similar directory structure