Skip to content

Commit

Permalink
CLDR-0000 show keyman keyboard
Browse files Browse the repository at this point in the history
- use language code
  • Loading branch information
srl295 committed Sep 8, 2023
1 parent caf1c10 commit 0774655
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/cldr-apps/js/src/esm/cldrMenu.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,14 @@ function updateLocaleMenu() {
const curLocale = cldrStatus.getCurrentLocale();
let prefixMessage = "";
if (curLocale != null && curLocale != "" && curLocale != "-") {
// here, update keyboards

for (const { InternalName } of keyman.getKeyboards()) {
keyman.removeKeyboards(InternalName);
}
keyman.addKeyboards(`@${curLocale}`);
// end keyboards

const locmap = cldrLoad.getTheLocaleMap();
cldrStatus.setCurrentLocaleName(locmap.getLocaleName(curLocale));
var bund = locmap.getLocaleInfo(curLocale);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,12 @@ public static void includeJavaScript(HttpServletRequest request, Writer out)
+ ".js\"></script>\n");
includeJqueryJavaScript(request, out);
includeCldrJavaScript(request, out);

out.write("<script src='https://s.keyman.com/kmw/engine/16.0.141/keymanweb.js'></script>\n");
out.write("<script src='https://s.keyman.com/kmw/engine/16.0.141/kmwuitoggle.js'></script>\n");
out.write("<script>(function(kmw) {"+
"kmw.init({attachType:'auto'});\n" +
"})(keyman);</script>\n");
}

private static void includeJqueryJavaScript(HttpServletRequest request, Writer out)
Expand Down

0 comments on commit 0774655

Please sign in to comment.