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

data localization not working just appeard but there is no impact done #115

Open
ahmedzedo opened this issue Feb 21, 2024 · 21 comments
Open

Comments

@ahmedzedo
Copy link

I have installed the Nuget Package and after using the data resource section for content types and content fields the values didn't appear after setting the translation so I can't see any impact of data localization are there any prerequisites that I should do to the Orchard site and content feel with translation impact

@hishamco
Copy link
Member

At the moment you can localize the content types and fields OOB, but you can build your own data provider

@hishamco
Copy link
Member

You can check the README file

@ahmedzedo
Copy link
Author

ahmedzedo commented Feb 21, 2024

@hishamco After following the mentioned steps, the module appeared properly. However, despite translating the content type and fields, no changes occurred. in the content types or fields that I translated them in the target language

@hishamco
Copy link
Member

Please a GIF screenshot

@ahmedzedo
Copy link
Author

@hishamco
image
image
image

@hishamco
Copy link
Member

Yes this can't be localized because the original OC doesn't use a Data Localization module, but if you inject the data localizer into your view you will be easy to localize them

@ahmedzedo
Copy link
Author

@hishamco I'm using the Orchard website with the headless recipe I just need the names of content types and custom fields to appear based on the current language in the admin panel

@hishamco
Copy link
Member

Regardless of what methodology you are using OC is unable to show the Content Types in Arabic because they don't implement dynamic localization yet, but I will struggle to accelerate the PR I did a long time ago

@hishamco
Copy link
Member

One possible option is to override Orchard Core pages

@ahmedzedo
Copy link
Author

@hishamco what are the benefits of the [OrchardCoreContrib?DataLocalization] Nuget package that I installed and enabled on my website while doesn't work yet, you mean that the package till now appeared as a module but still doesn't work

@hishamco
Copy link
Member

It's working as expected, you can take the benefits if you are using the data localization service inside OC, this was originally a PoC for dynamic data localization

@ahmedzedo
Copy link
Author

@hishamco Actually, I watched you at the conference demonstrate it, but I followed the steps I installed the Nuget package and I enabled the data localization and I used it as the image that I sent before but it doesn't change anything, so do you have an idea why it isn't working with me despite it appears and save the values properly
image

@hishamco
Copy link
Member

If the values save properly, it means everything working as expected, could you please add a razor view and inject IDataLocalizer

@ahmedzedo
Copy link
Author

@hishamco I have injected IDataLocalizer in razor page on my website I reran the project but there is no change occurred still the data localizer package doesn't work

@hishamco
Copy link
Member

Did you enable the feature? Did you specify the context?

@ahmedzedo
Copy link
Author

@hishamco Yes I enabled the feature so it appeared as you see in the images that I sent but what do you mean by specifying the context?

@hishamco
Copy link
Member

You need to specify the context for each localized string because it could be Content Type, or Content Field .. etc

I might need to add functional test, also I might demo the data localization again in the Orchard Core Meeting

@ahmedzedo
Copy link
Author

@hishamco Yes, you already divided them into two sections. I followed the demo as you demonstrated so, I think there is an issue. If there is another version that may be working fine. please, let me know how can I download this version

@hishamco
Copy link
Member

Let me check

@hishamco
Copy link
Member

Have a look to the unit tests here

You can share a minimal repo with the reproduced issue

@hishamco
Copy link
Member

@ahmedzedo I didn't from awhile, please let me know if the issue exists or I will close this

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

No branches or pull requests

2 participants