Skip to content

Conversation

@darcywong00
Copy link
Contributor

@darcywong00 darcywong00 commented Feb 12, 2026

For #384

Most of the PHP keyboard search pages can be localized.
This follows on by allowing the JS keyboard search to also be localized.

Off-the-shelf, i18n-next looked really good, but I opted for something that didn't need a framework:
https://medium.com/@mihura.ian/translations-in-vanilla-javascript-c942c2095170

Some of the changes

The JSON files make it easy to

  • add strings
  • add formatted parameters to strings
    For example:
t('pageNumberOfTotalPages', {pageNumber: res.context.pageNumber, totalPages: res.context.totalPages})

I had to add search.js and i18n.js as modules in order to import the JSON files.

Sample screenshots

french sil french more

Test-bot: skip

@darcywong00 darcywong00 added this to the A19S22 milestone Feb 12, 2026
@darcywong00 darcywong00 requested a review from mcdurdin February 12, 2026 04:12
@keymanapp-test-bot
Copy link

User Test Results

Test specification and instructions

User tests are not required

}

$keyboardClass = kbd.isDedicatedLandingPage ? 'keyboard keyboardLandingPage' : 'keyboard';
var keyboardClass = kbd.isDedicatedLandingPage ? 'keyboard keyboardLandingPage' : 'keyboard';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was this old jquery? I was getting console error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant