Translation of ClientConfig data and common resources data

Could anyone please help me out to translate the entire website content?
I am using ClientConfig extra/plugin to display global content, besides displaying a common resources data in the footer for every page using getResourceField extra/plugin but I don’t know how to translate them. I am using Babel for translation.
I have read out Bob’s documentation about lexicon but haven’t understood. I request someone to explain easily.
Thanks in advance.

Site URL:
Data from a common one resource

It looks like you’re hard-coding the resource with id 2 in your getResourceField snippet calls. This will only load values from the web context because that’s where resource 2 is.

In your screenshot, I can see that you’ve probably got resource 2 in the web context, linked with resource 36 in your ‘English’ context via Babel, right?

So, one way to automatically load the correct value would be to use context settings. Add a context setting called common_resources_id to both contexts. In the ‘Website’ context, make the value of the setting 2. In the ‘English’ context, make the value 36.

Then, change your chunk code to call getResourceField using the new context setting:

[[getResourceField? &id=`[[++common_resources_id]]` &field=`form_subtitle` &processTV=`1`]]
[[getResourceField? &id=`[[++common_resources_id]]` &field=`form_title` &processTV=`1`]]

This way, the context setting will return the appropriate resource id depending on which context the visitor is on.

@digitalpenguin You have made my day. I really owe to you. The common resource idea works fine. could you please tell me how to translate the ClientConfig global fields?

Glad to hear that worked out for you :slightly_smiling_face:

The context aware mode of ClientConfig sounds like it would suit your use-case better:

Though, if you need to use the global mode, I think you’ll need to create two of each setting using different cultureKey values.
If you’re using babel then I’m guessing you’ve already got context settings on each context for cultureKey, yeah? I’m going to assume that one is de and one is en.

So, if you needed a clientconfig field called address, instead you would create one called address_en and one called address_de. Then in your chunk/template, you could reference it with:


This works perfectly as well. Great you are. Your owe is not payable. Thanks a lot.

Cheers @mark537, you too.