Custom alt title in multilingual mode #364
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @adityatelange,
I would like to propose two minor tweaks in multilingual mode:
1. Custom alt title
Currently, when someone uses emoji like 🇬🇧 as languageName, PaperMod renders the alt title "as-is" (i.e.
:gb:
). In other words, it displays actual value from config ... which is not great. To go around this, I suggest to introduce a new optional param languageAltTitle in the "languages" section so the user could customise what is displayed.For example:
This will render a country flag 🇬🇧 with alt title "English".
2. Fallback to emoji
I suggest to add a fallback option to "emojify" the alt title. This way, if the User does not want to customise anything, PaperMod could still render emoji in the alt title properly.
You can preview the change at https://www.geeqla.com
Thank you!