Skip to content

Conversation

@ayinloya
Copy link
Collaborator

@ayinloya ayinloya commented Dec 17, 2025

PR Type

Enhancement


Description

  • Added language selection dropdown with English and Arabic options

  • Connected language selector to translation configuration

  • Enabled dynamic language switching in the example application


File Walkthrough

Relevant files
Enhancement
main.js
Add language dropdown to example form UI                                 

example/main.js

  • Added language selection dropdown with English and Arabic options
  • Positioned selector above the product dropdown in the form
+4/-0     
script.js
Wire language selector to translation configuration           

example/script.js

  • Added reference to language selector element
  • Uncommented and configured translation settings to use selected
    language
  • Connected language dropdown value to translation configuration
+4/-3     


Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @ayinloya ayinloya marked this pull request as ready for review December 18, 2025 17:29
    @prfectionist
    Copy link
    Contributor

    prfectionist bot commented Dec 18, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Missing Event Listener

    The language dropdown is added to the DOM and its value is read during form submission, but there's no event listener to handle dynamic language switching. Users would need to resubmit the form to see language changes take effect, which may not provide the expected user experience for real-time language switching.

    translation: {
      language: language.value,
    },
    Missing Default Selection

    The language dropdown doesn't have a default selected value. Consider adding a 'selected' attribute to one of the options (likely English) to ensure consistent initial state and avoid potential undefined behavior if the form is submitted without user interaction with the dropdown.

    <select id="language">
      <option value="en">English</option>
      <option value="ar">العربية (Arabic)</option>
    </select>

    Base automatically changed from localisation-ltr-support to main December 23, 2025 14:03
    @ayinloya ayinloya merged commit f888482 into main Dec 23, 2025
    15 checks passed
    @ayinloya ayinloya deleted the localisation-example-app branch December 23, 2025 14:33
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    3 participants