How to best manage multi-lingual presentations?

落爺英雄遲暮 提交于 2019-12-10 15:56:23

问题


I have a presentation done in Latex+Beamer, currently in french. I also need to make the same presentation, with the same structure, in dutch. I'd like to maintain the presentation in one file, so that if I want to change the structure of it, I only have to do it in one place. What's the best way to put the translations outside of the presentation file?

I thought of defining a command for each text element to be present in the slides, and having a different command definition for each language. But it seems quite heavy....

Thanks in advance

RAph


回答1:


I've seen only one solution to this (as part of the babel package) — you wrap each contiguous unit of text in a command that looks like this:

\langswitcher{french text}{dutch text}

and then define \langswitcher in the preamble to output either the first or the second argument.

I know this does not put the translation into a separate file, but this is simple, fast, works for sure, and probably solves your problem.

To put a translation in a separate file, at the very least you'll have to identify each piece of text anyway.




回答2:


I'd do

\newcommand{\en}{#1}
\newcommand{\de}{}

And in the text use:

\en{ my text in english }
\de{ german text }

And after I'd simply swap the commands. Be aware that result should be different only because the text should take more or less space. You can cheat a bit using \phantom command. This solution use only one file though.




回答3:


keep each slide in its own file... then \input{dutch-file} \input{french-file}



来源:https://stackoverflow.com/questions/2507769/how-to-best-manage-multi-lingual-presentations

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!