-
Notifications
You must be signed in to change notification settings - Fork 289
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
Language-specific relationship names #2331
Comments
That's great!Thank you very much. |
Should this be marked as solved? Other issues for specific languages reference this issue. These languages are not solved yet. |
Also, I really would prefer a more generic access point, e.g. in ModuleLanguageInterface
so that specific languages/ custom modules get their chance to implement their logic differently, rather than having to provide an array of relationships. In your solution, how can specific languages define specific algorithms for splitting complex relationship paths? |
I guess you could extend
But when I get feedback from more languages, then I expect the logic will change. |
Is there any chance that you'll consider generalizing the interface, as suggested? I think this has advantages as it decouples the logic from the interface. After all, what is the abstract goal here? In my opinion, it is to get a translated relationship path name from a specific language. So using a method that just returns this string seems more flexible, and more in line with similar methods from LocaleInterface, such as 'percent($number)' and 'number($number)'. The current implementation can of course still be used to support modules in implementing this, i.e. they could use the RelationshipService to provide the result, but it would be easier to extend this with special logic, without having to change the interface later. |
Now that we have modules for langauges, we have somewhere to store logic for language-specific relationship names. e.g.
Each language can define its own rules/translations.
Anything that is undefined will get a translation of the English relationship name.
The text was updated successfully, but these errors were encountered: