-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion for multi lang menu #177
Conversation
Can you please make changes also to exampleSite so that the feature is demonstrated? It's totally ok if the content is not translated at the moment, but it would be nice to demonstante the feaature and see it also in the netlify pull request preview. |
I can look into styling it further, if you dont mind me contributing to this branch. |
Would welcome that.
On 18. Mar 2024, at 22:27, zjedi ***@***.***> wrote:
I can look into styling it further, if you dont mind me contributing to this branch.
—
Reply to this email directly, view it on GitHub<#177 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AVLSKK4R6V5IEI3OJAYDERTYY5L4RAVCNFSM6AAAAABE4LPJTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBVGAZDSOJWGQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I quickly checked how this language swithing looks and I'm thinking ...
|
Right now the is room for more languages as they just all sit on the top. four or five and you can make more room if you don’t show the current language. Four or five languages is enough for me. Longer language list like 10+ would definitely need something else.
However, this is completly up to taste. I just did some quick styling with what was available already. :-)
You can add an option to put the language list in the footer as a drop-down menu.
On 24. Mar 2024, at 23:01, zjedi ***@***.***> wrote:
I quickly checked how this language swithing looks and I'm thinking ...
1. is it enough to support just two laguages for now? Are two enough for you?
2. for the future, we will eventually need to support 3+ languages, which involves a dropdown and somewhat more complex logic. But we can do it later when the need arises.
—
Reply to this email directly, view it on GitHub<#177 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AVLSKKYJ65D7KBXMFHWJQMTYZ5EMFAVCNFSM6AAAAABE4LPJTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWHE2TSMRTGY>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Thanks, the language switching menu moved toward top right corner looks much better, I think we could have it this way for the moment. |
Some images use ../images/ to reference. Should be changed to just images/
Also some images are missing (I.e. those from services.md)
Additionally, images might need resources.Get magic to work. I corrected that with the header_logo already. This way, the image gets copied for sure. assets are not copied to public if they are not used/referenced
On 24. Mar 2024, at 23:31, zjedi ***@***.***> wrote:
Thanks, the language switching menu moved toward top right corner looks much better, I think we could have it this way for the moment.
Quick test: There are still some issues with images: cover image, in-content images, quotation marks, icons in contact section (newly available also is footer) Linksto images are somehow broken.
—
Reply to this email directly, view it on GitHub<#177 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AVLSKK6YKQ2YNSKFMDUTWY3YZ5H2RAVCNFSM6AAAAABE4LPJTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWHE3DQNZWGY>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Process requires v104
Looks much better, we just have to sort out broken images. |
@ilja-radusch I'm checking out the image problem and I wonder, what is the idea behind moving images from It looks like the global stuff goes under assets, but the i18n content (homepage) needs to either stay in static or be under language-specific folders. |
Hugo checks if the images in assets are referenced and will only copy those accessed/used by the site.
Also all resources.Get functions will need the images to be in the assets directory. Without utilizing resources, getting a .PermaLink or .RelLink is not possible. This is what we wanted in the start.
However, you have to make sure all resources are referenced or .Publish
On 11. May 2024, at 01:14, zjedi ***@***.***> wrote:
@ilja-radusch<https://github.com/ilja-radusch> I'm checking out the image problem and I wonder, what is the idea behind moving images from static to assets? Because I can't get the images from assets get properly loaded when internationalized. It does work from static though.
—
Reply to this email directly, view it on GitHub<#177 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AVLSKK7JX5HSK42DOIPTGQ3ZBVIDPAVCNFSM6AAAAABE4LPJTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBVGM3TCNBWGI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@ilja-radusch Thanks for explanation. I can see the following way forwards: A fix for the broken images would be either: A. move content-related images back to static B. move content-related images to content folders. C. create shortcode for including images from assets Maybe we can revisit the topic in a separate PR that would be focused on moving these images to assets - I tried and failed to use them from I plan pushing example for both A and B for german language, and moving some of the images back to static. That would unblock merging this feature. |
Ok, it seems that in the latest 10 versions, this must have changed, I just updated to latest Hugo version (0.125) and getting different results regarding image linking. Previously I was on something like 0.11x |
@ilja-radusch I've played around with various approaches and documented possible ways of localizing markdown and images. Have you published your site already somewhere, or do you have it only locally in development? |
attempt to fix broken link for image from assets
Netlify: upgrade HUGO_VERSION = "0.121.1"
…expects to access those only programmatically, not via markdown.
This is a quick suggestion for a language selection menu right below the site menu. This pulls the currently configured languages to display the menu.
Two new site params are used:
which control the overall rendering of the language menu and whether the current language should be rendered or omitted.
I could not style the language menu any further. Another idea would be to put that into the footer or at the top of the page.
Hope this helps.