OrchardCoreContrib.Modules icon indicating copy to clipboard operation
OrchardCoreContrib.Modules copied to clipboard

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

Open ahmedzedo opened this issue 1 year ago • 21 comments

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

ahmedzedo avatar Feb 21 '24 13:02 ahmedzedo

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

hishamco avatar Feb 21 '24 13:02 hishamco

You can check the README file

hishamco avatar Feb 21 '24 13:02 hishamco

@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

ahmedzedo avatar Feb 21 '24 13:02 ahmedzedo

Please a GIF screenshot

hishamco avatar Feb 21 '24 14:02 hishamco

@hishamco image image image

ahmedzedo avatar Feb 21 '24 14:02 ahmedzedo

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

hishamco avatar Feb 21 '24 15:02 hishamco

@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

ahmedzedo avatar Feb 21 '24 15:02 ahmedzedo

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 avatar Feb 21 '24 15:02 hishamco

One possible option is to override Orchard Core pages

hishamco avatar Feb 21 '24 15:02 hishamco

@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

ahmedzedo avatar Feb 21 '24 15:02 ahmedzedo

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

hishamco avatar Feb 21 '24 15:02 hishamco

@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

ahmedzedo avatar Feb 21 '24 16:02 ahmedzedo

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

hishamco avatar Feb 21 '24 20:02 hishamco

@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

ahmedzedo avatar Feb 25 '24 05:02 ahmedzedo

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

hishamco avatar Feb 25 '24 10:02 hishamco

@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?

ahmedzedo avatar Feb 25 '24 13:02 ahmedzedo

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

hishamco avatar Feb 25 '24 13:02 hishamco

@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

ahmedzedo avatar Feb 25 '24 13:02 ahmedzedo

Let me check

hishamco avatar Feb 25 '24 19:02 hishamco

Have a look to the unit tests here

You can share a minimal repo with the reproduced issue

hishamco avatar Feb 25 '24 22:02 hishamco

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

hishamco avatar Apr 18 '24 07:04 hishamco