PrestaShop / open-source

Sources for www.prestashop-project.org
https://www.prestashop-project.org/
Other
31 stars 38 forks source link

First multilingual PR (homepage localised, urls localised, some content localised) #134

Closed marsaldev closed 10 months ago

marsaldev commented 2 years ago
Questions Answers
Description Add multilingual configuration and Italian language (first PR). Homepage and link are localised, remain the content of most of pages to localise. I will made other PR to localise each page
Fixed ticket Fixes #133

Some details: Added all the .md files with the .it suffix to get recognized from hugo. Changed main config.yml to add Italian language, created menus.it.yml and moved menus.yml in menus.en.yml

eternoendless commented 1 year ago

I'm not sure if all pages should be localized, especially the maintainer's guide. It might make it very hard to keep it updated. I'd concentrate on the "communication" parts that don't change too often, like the home page, landing pages, etc.

I'd prefer not to create copies of pages until we are sure we want to translate them and they are effectively translated. That way we won't have duplicate (and/or outdated) content.

Menus can be translated using identifiers: https://gohugo.io/content-management/multilingual/#dynamically-localizing-menus-with-i18n

marsaldev commented 1 year ago

Hi @eternoendless, sorry for my late reply.

If you see all the pages, I haven't translated any page, except the homepage 😊

Sadly, both ways of translating content in Hugo is by duplicating files(or pages). And the problem is, if "you" don't create the file(s) the link won't shop up in the menu :/

https://user-images.githubusercontent.com/48283112/207305005-f9392c03-dd88-41a7-8695-a2503be4c69f.mp4

I checked (and tried locally) the translations with i18n system for the menu, it works (but we need to fix the theme to get works), but to be honest, I'd like to avoid mixing the two translations systems, I mean, i18n and physical file, wdyt?

To be clear, I'd prefer the i18n, but I think it's hard to maintain with long contents (the page content), and, the translations files are in the theme and not in the "core".

kpodemski commented 10 months ago

Hi @marsaldev

I'm pretty sure that, unfortunately, at the moment, we won't continue with this subject. I'm closing this PR.