Open cgnieder opened 8 years ago
Original comment by Clemens Niederberger (Bitbucket: cgnieder, GitHub: cgnieder).
How about something like this:
#!latex
\documentclass[12pt]{article}
\usepackage[english,ngerman]{babel}
\usepackage{substances,translations}
\DeclareTranslationFallback{decane}{Decane}
\DeclareTranslation{German}{decane}{Decan}
\DeclareSubstance{decane}{
name = {\GetTranslation{decane}},
sort = {\GetTranslation{decane}},
alt = {\normal-\GetTranslation{decane}},
altsort = {n-\GetTranslation{decane}},
formula = {C10H22},
structure = {-[:30]-[:-30]-[:30]-[:-30]-[:30]-[:-30]-[:30]-[:-30]-[:30]},
CAS = {124-18-5},
PubChem = {15600},
pictograms = {flame,health},
H = {226,304},
P = {210,260,262,301+310,331},
mass = {142.29},
density = {0.73},
mp = {-29.7},
bp = {174},
phase = {liquid}
}
\begin{document}
\chem{decane}
\selectlanguage{english}
\chem{decane}
\end{document}
Original report by Christian KNITTL-FRANK (Bitbucket: lcnittl, GitHub: lcnittl).
It would be very nice, if there was a multi language support, with specific Name/Alt/Sort/Altsort fields for different languages in only one database file. Maybe this could be coupled with the langugae of f.e. babel. This would be most useful for the indexing feature, as it could read out the different names, depending on the language setting. Also the standard \chem{} command could automatically read out the name for the set language.
It might look like this in the database:
I'm sorry - I'm not sure if something like this is possible (And if this is the right place for such proposals)