Skip to content
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

More in-depth tutorial on Internationalization? #67

Open
visto9259 opened this issue Mar 22, 2024 · 2 comments
Open

More in-depth tutorial on Internationalization? #67

visto9259 opened this issue Mar 22, 2024 · 2 comments

Comments

@visto9259
Copy link
Contributor

The Internationalization section of the tutorial is very light.
It provides an overview that it is possible to add other languages but it does not provide a real example of adding another locale to the application.

Should there be a more in-depth tutorial on this?
Should it be part of this tutorial?
Do we know of a tutorial on this that could be referenced (assuming that it would be ok to reference a 3rd-party tutorial)?

I am just raising this as an issue so that we have a trace of the decision.

@froschdesign
Copy link
Member

…but it does not provide a real example of adding another locale to the application.

Correct because the problem is that the component laminas-i18n or an satellite package does not provide a solution for this. For a laminas-mvc based application this could be a listener.

The documentation of Mezzio contains two descriptions for this problem:

But in my opinion, this is not helpful, as the middleware or listener should be provided by the related components. Ready to use for the end user and not by copying and pasting from the documentation.
Therefore, a solution should first be created in the component, then the usage can be explained in the tutorials.

…assuming that it would be ok to reference a 3rd-party tutorial…

We can create a section "Community Resources" and add 3rd-party tutorials there. (Example)
But before this can be added, we need an automatic link checker, otherwise we will produce dead links in the future.

@visto9259
Copy link
Contributor Author

visto9259 commented Mar 22, 2024

I agree that the biggest issue that I saw with having a more detailed tutorial is the mechanism to switch locales. There is nothing in MVC components to provide a "off-the-shelf" mechanism to do that. In my app, the locale is part of the user profile. Only public pages use locale via routing. I also used cookies to store the selected locale. All done via listeners.
So for now, I suggest that we keep it as is. The poedit screenshot is outdated but that's a minor issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants