Skip to content

Feat add lang code#26

Open
ahuininga-orisha wants to merge 4 commits intobetafrom
feat-add-lang-code
Open

Feat add lang code#26
ahuininga-orisha wants to merge 4 commits intobetafrom
feat-add-lang-code

Conversation

@ahuininga-orisha
Copy link
Copy Markdown
Collaborator

@ahuininga-orisha ahuininga-orisha commented Mar 31, 2026

This pull request introduces support for configurable language settings in the TweakwiseJs module.

This pull requests adds two settings

  1. For the catalog language (based on available languages in tweakwise). This determines the translations of the filters.

  2. The ui language. This determines the language of the ui interface (add to cart button, etc)

How to test

  • Have an minimum of 2 languages configured in tweakwise
  • Translate filternames in your filtertemplate in tweakwise
  • In tweakwise js, select the language for your ui, and catalog/filters.
  • See if the language changes in the frontend.

Copy link
Copy Markdown
Collaborator

@jansentjeu jansentjeu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also set target branch to develop

public function __construct(
Context $context,
Registry $registry,
protected string $idField = 'key',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the language ID data key not always key? Why do we need this configurable?

It is only used in src/Model/Api/Response/Catalog/LanguageResponse.php, right?

Comment on lines +46 to +47
'label' => $language['name'],
'value' => $language['key']
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you create LanguageType objects when you don't use the functions of it?
$language is a type of the LanguageType object, the reason to do this is that you can retrieve data with the getters.

$language->getName()
$language->getLanguageId()

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

Successfully merging this pull request may close these issues.

2 participants