It's not possible to use multiple acronym styles (one will usually override another). However, here's a possible solution that uses the user1
key to store the font style to use when you define an acronym:
% arara: pdflatex
% arara: makeglossaries
% arara: pdflatex
% arara: pdflatex
\documentclass{article}
\usepackage[acronym]{glossaries}
\makeglossaries
\newcommand*{\engstyle}[1]{\emph{#1}}
\newcommand*{\espstyle}[1]{#1}
\newcommand*{\newengacronym}[4][]{%
\newacronym[user1=\protect\engstyle,#1]{#2}{#3}{#4}%
}
\newcommand*{\newespacronym}[4][]{%
\newacronym[user1=\protect\espstyle,#1]{#2}{#3}{#4}%
}
\newacronymstyle{lang}
{%
\GlsUseAcrEntryDispStyle{long-short}%
}%
{%
\GlsUseAcrStyleDefs{long-short}%
\renewcommand*{\genacrfullformat}[2]{%
\glsentryuseri{##1}{\glsentrylong{##1}}##2\space
(\glsentryshort{##1})%
}%
\renewcommand*{\Genacrfullformat}[2]{%
\glsentryuseri{##1}{\Glsentrylong{##1}}##2\space
(\glsentryshort{##1})%
}%
\renewcommand*{\genplacrfullformat}[2]{%
\glsentryuseri{##1}{\glsentrylongpl{##1}}##2\space
(\glsentryshortpl{##1})%
}%
\renewcommand*{\Genplacrfullformat}[2]{%
\glsentryuseri{##1}{\Glsentrylongpl{##1}}##2\space
(\glsentryshortpl{##1})%
}%
}
\setacronymstyle{lang}
\newengacronym{ENG}{ENG}{English Acronym}
\newespacronym{ESP}{ESP}{Spanish Acronym}
\begin{document}
First use : \gls{ENG}, \gls{ESP}.
Next user: \gls{ENG}, \gls{ESP}.
\printglossaries
\end{document}
This produces:
Edit:
If you want to redefine \glsentrylong
, you'll also need to redefine \Glsentrylong
otherwise you'll cause a problem for \makefirstuc
:
% arara: pdflatex
% arara: makeglossaries
% arara: pdflatex
% arara: pdflatex
\documentclass{article}
\usepackage[acronym]{glossaries}
\makeglossaries
\newcommand*{\engstyle}[1]{\emph{#1}}
\newcommand*{\espstyle}[1]{#1}
\newcommand*{\newengacronym}[4][]{%
\newacronym[user1=\protect\engstyle,#1]{#2}{#3}{#4}%
}
\newcommand*{\newespacronym}[4][]{%
\newacronym[user1=\protect\espstyle,#1]{#2}{#3}{#4}%
}
\makeatletter
\newacronymstyle{lang}
{%
\GlsUseAcrEntryDispStyle{long-short}%
}%
{%
\GlsUseAcrStyleDefs{long-short}%
\renewcommand*{\glsentrylong}[1]{%
\glsentryuseri{##1}{\@gls@entry@field{##1}{long}}}%
\renewcommand*{\glsentrylongpl}[1]{%
\glsentryuseri{##1}{\@gls@entry@field{##1}{longpl}}}%
\renewcommand*{\Glsentrylong}[1]{%
\glsentryuseri{##1}{\@Gls@entry@field{##1}{long}}}%
\renewcommand*{\Glsentrylongpl}[1]{%
\glsentryuseri{##1}{\@Gls@entry@field{##1}{longpl}}}%
}
\makeatother
\setacronymstyle{lang}
\newengacronym{ENG}{ENG}{English Acronym}
\newespacronym{ESP}{ESP}{Spanish Acronym}
\begin{document}
First use : \gls{ENG}, \gls{ESP}.
Next user: \gls{ENG}, \gls{ESP}.
Long form: \acrlong{ENG}, \acrlong{ESP}.
Long form (first UC): \Acrlong{ENG}, \Acrlong{ESP}.
Plural long form: \acrlongpl{ENG}, \acrlongpl{ESP}.
Plural long form (first UC): \Acrlongpl{ENG}, \Acrlongpl{ESP}.
\printglossaries
\end{document}
However if you do the above, you'll no longer be able to use \glsentrylong
in PDF bookmarks.