\makenoidxglossaries is only designed for ASCII. (See No printed glossaries when switching to \makenoidxglossaries.) The comments have recommended xindy, which has the best multilingual support of the three indexing methods that work with the glossaries package, but there are still some more problems.
If we first start without setting up the indexing:
\documentclass{article}
\usepackage{CJKutf8}
\usepackage{glossaries}
\newglossaryentry{squareroot}{name={\begin{CJK}{UTF8}{min}ルート\end{CJK}},
description={square root}}
\begin{document}
\begin{CJK}{UTF8}{min}ルート\end{CJK}% for comparison
\gls{squareroot}
\end{document}
then this causes the error:
! Undefined control sequence.
\in@ #1#2->\begingroup \def \in@@
##1#1{}\toks@ \expandafter {\in@@ #2{}{}#1...
If this error occurs with \newglossaryentry then the problem is typically an expansion issue. This can be switched off with \glsnoexpandfields. It's also a good idea to have a wrapper command that takes a single argument if the name field needs formatting. The sort value is copied from the name and the \begin{CJK}{UTF8}{min} part will interfere with the collator.
Here's the modified version:
\documentclass{article}
\usepackage{CJKutf8}
\usepackage{glossaries}
\newrobustcmd{\cjkname}[1]{\begin{CJK}{UTF8}{min}#1\end{CJK}}
\glsnoexpandfields
\newglossaryentry{squareroot}{name={\cjkname{ルート}},
description={square root}}
\begin{document}
\begin{CJK}{UTF8}{min}ルート\end{CJK}
\gls{squareroot}
\end{document}
This now compiles and produces:

The next step is to add the code to generate the index. A listing of xindy's modules/lang directory shows:
albanian finnish icelandic mongolian spanish
belarusian french italian norwegian swedish
bulgarian general klingon persian turkish
croatian georgian korean polish ukrainian
czech german kurdish portuguese upper-sorbian
danish greek latin romanian vietnamese
dutch gypsy latvian russian
english hausa lithuanian serbian
esperanto hebrew lower-sorbian slovak
estonian hungarian macedonian slovenian
so there doesn't seem to be any support for Japanese. The closest is Korean. The number group needs to be switched off as it's designed for Latin alphabets:
\documentclass{article}
\usepackage{CJKutf8}
\usepackage[xindy={language={korean},glsnumbers=false}]{glossaries}
\makeglossaries
\newrobustcmd{\cjkname}[1]{\begin{CJK}{UTF8}{min}#1\end{CJK}}
\glsnoexpandfields
\newglossaryentry{squareroot}{name={\cjkname{ルート}},
description={square root}}
\begin{document}
\begin{CJK}{UTF8}{min}ルート\end{CJK}
\gls{squareroot}
\printglossaries
\end{document}
If the file is called test.tex, then the build process is:
pdflatex test
makeglossaries test
pdflatex test
(There's also a Lua version makeglossaries-lite for those who don't have Perl installed, but since xindy is also a Perl script you'll need the Perl interpreter for that anyway.)
Alternatively you can explicitly run xindy:
pdflatex test
xindy -L korean -C utf8 -I xindy -M test -t test.glg -o test.gls test.glo
pdflatex test
The resulting document looks like:

The file created by xindy has the code used to display the glossary:
\begin{theglossary}\glossaryheader
\glsgroupheading{default}\relax\glsresetentrylist
\glossentry{squareroot}{\glossaryentrynumbers{\relax
\glsXpageXglsnumberformat{}{1}}}%
\end{theglossary}\glossarypostamble
The \glsgroupheading{default} part shows that xindy doesn't recognise the Japanese characters and has put the entry in the default letter group. This means that you can't use any of the letter group styles, such as indexgroup. It may also indicate that it doesn't have a rule that can correctly sort ルート.
There's a fourth indexing option, and that's to use bib2gls which requires the extension package glossaries-extra with the record option. bib2gls is a command line application (requires at least Java 7)¹ that can be used to sort and collate entries. This method requires that all the entries are defined in a .bib file. For example, suppose the file called testcjk.bib contains:
@entry{squareroot,
name={\cjkname{ルート}},
description={square root}
}
Then the document now looks like:
\documentclass{article}
\usepackage{CJKutf8}
\usepackage[record]{glossaries-extra}
\newrobustcmd{\cjkname}[1]{\begin{CJK}{UTF8}{min}#1\end{CJK}}
\glsnoexpandfields
\GlsXtrLoadResources[
src=testcjk,% bib file
sort={ja-JP}% locale
]
\begin{document}
\begin{CJK}{UTF8}{min}ルート\end{CJK}
\gls{squareroot}
\printunsrtglossaries
\end{document}
The build process is now:
pdflatex test
bib2gls test
pdflatex test
This produces:

If you want letter groups, you need to use the --group switch:
pdflatex test
bib2gls --group test
pdflatex test
as well as setting a glossary style that supports letter groups (such as indexgroup). With the --group switch, this example makes bib2gls write the following code to the file loaded by \GlsXtrLoadResources:
\bibglssetlettergrouptitle{{ルー}{ルー}{9568256}{}}
This means that bib2gls thinks that "ルート" belongs to the "ルー" letter group. I don't know any Japanese so I don't know if this is correct, but the group title will need encapsulating within the CJK environment. Expansion is also an issue here since the Japanese characters are active with CJKutf8. Here's the amended example:
\documentclass{article}
\usepackage{CJKutf8}
\usepackage[record,style=indexgroup]{glossaries-extra}
\newrobustcmd{\cjkname}[1]{\begin{CJK}{UTF8}{min}#1\end{CJK}}
\glsnoexpandfields
\newcommand{\bibglslettergrouptitle}[4]{\unexpanded{\cjkname{#1}}}
\GlsXtrLoadResources[
src=testcjk,% bib file
sort={ja-JP}% locale
]
\begin{document}
\begin{CJK}{UTF8}{min}ルート\end{CJK}
\gls{squareroot}
\printunsrtglossaries
\end{document}
The build process is now:
pdflatex test
bib2gls --group test
pdflatex test
The resulting document looks like:

For the English to Japanese glossary, if it's a straight swap of name and description you can change the .bib file to
@dualentry{squareroot,
name={\cjkname{ルート}},
description={square root}
}
The letter group heading should only be encapsulated for the japanese glossary type. This can be dealt with by making \bibglslettergrouptitle check the glossary type:
\newcommand*{\englishlettergroup}[1]{#1}% heading used for `type=english`
\newcommand*{\japaneselettergroup}[1]{\cjkname{#1}}% heading used for `type=japanese`
\newcommand{\bibglslettergrouptitle}[4]{% #4 = type
\unexpanded{\csuse{#4lettergroup}{#1}}}
The document file is now:
\documentclass{article}
\usepackage{CJKutf8}
\usepackage[record,style=indexgroup,nomain]{glossaries-extra}
\newglossary*{japanese}{Japanese to English}
\newglossary*{english}{English to Japanese}
\newrobustcmd{\cjkname}[1]{\begin{CJK}{UTF8}{min}#1\end{CJK}}
\glsnoexpandfields
\newcommand*{\englishlettergroup}[1]{#1}
\newcommand*{\japaneselettergroup}[1]{\cjkname{#1}}
\newcommand*{\bibglslettergrouptitle}[4]{\unexpanded{\csuse{#4lettergroup}{#1}}}
\GlsXtrLoadResources[
src=testcjk,% bib file
sort={ja-JP},% locale used to sort primary entries
dual-sort={en-GB},% locale used to sort secondary entries
type=japanese,% put the primary entries in the 'japanese' glossary
dual-type=english% put the dual entries in the 'english' glossary
]
\begin{document}
Japanese: \gls{squareroot}
English: \gls{dual.squareroot}
\printunsrtglossaries
\end{document}
(You can use just the language code without the region: sort=ja,dual-sort=en.)
This produces:

You can change the default dual prefix dual. if required. For example:
\documentclass{article}
\usepackage{CJKutf8}
\usepackage[record,style=indexgroup,nomain]{glossaries-extra}
\newglossary*{japanese}{Japanese to English}
\newglossary*{english}{English to Japanese}
\newrobustcmd{\cjkname}[1]{\begin{CJK}{UTF8}{min}#1\end{CJK}}
\glsnoexpandfields
\newcommand*{\englishlettergroup}[1]{#1}
\newcommand*{\japaneselettergroup}[1]{\cjkname{#1}}
\newcommand*{\bibglslettergrouptitle}[4]{\unexpanded{\csuse{#4lettergroup}{#1}}}
\GlsXtrLoadResources[
src=testcjk,% bib file
sort={ja-JP},% locale used to sort primary entries
dual-sort={en-GB},% locale used to sort secondary entries
type=japanese,% put the primary entries in the 'japanese' glossary
dual-type=english,% put the dual entries in the 'english' glossary
dual-prefix={en.}
]
\begin{document}
Japanese: \gls{squareroot}
English: \gls{en.squareroot}
\printunsrtglossaries
\end{document}
You can provide the definition of \cjkname in a .bib file, but it needs to be protected from bib2gls's interpreter to prevent it from interfering with the sort value. For example, if the file defs-nointerpret.bib contains:
@preamble{"\providerobustcmd{\cjkname}[1]{\begin{CJK}{UTF8}{min}#1\end{CJK}}
\providecommand*{\englishlettergroup}[1]{#1}
\providecommand*{\japaneselettergroup}[1]{\cjkname{#1}}
\providecommand*{\bibglslettergrouptitle}[4]{\unexpanded{\csuse{#4lettergroup}{#1}}}"}
then the document is now:
\documentclass{article}
\usepackage{CJKutf8}
\usepackage[record,style=indexgroup,nomain]{glossaries-extra}
\newglossary*{japanese}{Japanese to English}
\newglossary*{english}{English to Japanese}
\glsnoexpandfields
\GlsXtrLoadResources[
src={defs-nointerpret}, % bib file containing @preamble
interpret-preamble=false % write the @preamble contents but don't try to interpret
]
\GlsXtrLoadResources[
src=testcjk,% bib file
sort={ja-JP},% locale used to sort primary entries
dual-sort={en-GB},% locale used to sort secondary entries
type=japanese,% put the primary entries in the 'japanese' glossary
dual-type=english,% put the dual entries in the 'english' glossary
dual-prefix={en.}
]
\begin{document}
Japanese: \gls{squareroot}
English: \gls{en.squareroot}
\printunsrtglossaries
\end{document}
This hides away the commands that are used by the glossary entries but aren't used explicitly in the document. A more general purpose approach for the letter group headings is:
\newcommand*{\englishlettergroup}[1]{#1}
\newcommand*{\japaneselettergroup}{\cjklettergroup}
\newcommand*{\cjklettergroup}[1]{\cjkname{#1}}
\newcommand{\bibglslettergrouptitle}[4]{%
\unexpanded{%
\ifcsdef{#4lettergroup}%
{\csuse{#4lettergroup}{#1}}%
{\cjklettergroup{#1}}%
}%
}
This will use \englishlettergroup if type=english, \japaneselettergroup if type=japanese, and will just use \cjklettergroup if type is something else (such as the default main). So the file defs-nointerpret.bib now contains:
@preamble{"\providerobustcmd{\cjkname}[1]{\begin{CJK}{UTF8}{min}#1\end{CJK}}
\providecommand*{\englishlettergroup}[1]{#1}
\providecommand*{\japaneselettergroup}{\cjklettergroup}
\providecommand*{\cjklettergroup}[1]{\cjkname{#1}}
\providecommand{\bibglslettergrouptitle}[4]{%
\unexpanded{%
\ifcsdef{#4lettergroup}%
{\csuse{#4lettergroup}{#1}}%
{\cjklettergroup{#1}}%
}%
}"}
Addendum: iterative commands like \glsaddall don't work with the record option because on the first LaTeX run no entries are defined so there's nothing to iterate over. If you want to select all entries, regardless of whether they've been used in the document, use selection=all:
\GlsXtrLoadResources[
src={testcjk},% bib file list
selection=all,% select all entries provided in this 'src' list
sort={ja-JP},% locale used to sort primary entries
dual-sort={en-GB},% locale used to sort secondary entries
type=japanese,% put the primary entries in the 'japanese' glossary
dual-type=english,% put the dual entries in the 'english' glossary
dual-prefix={en.}
]
Note that \glsaddall internally uses \glsadd (which always adds a location to the location list). This means that nonumberlist has to be used otherwise you end up with the same location in every entry in the glossary. With bib2gls if an entry is selected through selection=all it will only have a location list if it's been indexed in the document with commands like \gls or \glsadd.
¹ Note that Java 7 has now reached its end of life and is deprecated. Java 8 includes support for the Common Locale Data Repository (CLDR) which provides more extensive locale support.
makeindexwill work here. Most likelyxindyis the way to go – Sep 07 '17 at 06:48\makenoidxglossarieswhich doesn't use eithermakeindexorxindy. I'll try withxindy. – James Sep 07 '17 at 07:30MikTex 2.9 > xindy > modules > lang.Is it therefore not possible? And, if it is possible, will I only be able to use glossaries with English or Japanese names? I would like to be able to use both.
– James Sep 07 '17 at 08:13