Context:
In the text of a document I am planning I will have numerous "strings" that are in a foreign language (foreign to me of course).
My current plan is to use the glossaries package because it would allow me to:
- create a custom type
- add keys
- treat the
\gls{english name so I know what I am doing}as an easily maintained string. - As a foreign language I expect heavy corrections and a single location to maintain and fix these strings will be
- treat the first usage like foreign quote (English translation)
- for example:
\gls{My land is rich}could easily produce
- for example:
M'fhearann saidhbhir (My land is rich)
- doesn't matter whether I am using individual words, or sentences or paragraphs, as long as I redefine what appearance the gls call formats the output with.
Based on an older question: Am I over exerting the glossaries package? I believe I could also use etoolbox to do something similar
\newentry{My land is rich}{M'fhearann saidhbhir}
and use it with
\entry{My land is rich} (My land is rich)
Problem: if the translation is what is wrong it will be an incorrect label in the TeX file, but can be corrected in the definitions file. This is what makes me wonder if someone has already written a package to address this kind of thing.
Conceptually, there are infinite approaches to manage data in the form of label replaced strings but ideally I still need to work with recognizable labels therefore things like \entry{T1} or \gls{T1} or \T1 (as could be created with \newcommand{}{}) wouldn't be helpful even though they strictly solve the problem.
I have seen some pretty dynamic looking packages so am wondering if things exist.
The only other not fully formed concept I have had is to consider redefining a new custom command that would contain something like \translate{T1}{my land is rich} where the second argument is useless, purely cosmetic for the author and any TeX savvy collaborator reviewing the files, and the T1 is the label that would populate using whatever package I am able to use i.e. glossaries or etoolbox
\defmaker{richland}{My land is rich}{M'fhearann saidhbhir}; then you use in your file\richland, and that expands to the whichever string you want it to based on some boolean switch. Then you'd also have other ones like\defmaker{poorland}{My land is poor}{M'fhear kasjdfois}which you use as\poorland, and so on.... But I don't really understand what you want, so this may be a bad idea. – jon Jun 27 '15 at 22:53