![pgfgantt에서 주 및 월 언어 변경](https://rvso.com/image/348615/pgfgantt%EC%97%90%EC%84%9C%20%EC%A3%BC%20%EB%B0%8F%20%EC%9B%94%20%EC%96%B8%EC%96%B4%20%EB%B3%80%EA%B2%BD.png)
pgfgantt
스웨덴어로 작성되어야 하는 프로젝트에서 패키지를 사용하고 있는데 월 이름을 변경하는 데 문제가 있습니다. 나는 찾았다이것\usepackage[swedish]{translator}
이전에 사용해 보았지만 \usepackage{pgfgantt}
언어는 여전히 영어입니다.
PdfLaTeX 컴파일러와 함께 Sharelatex를 사용하고 있습니다.
답변1
translator
충분하지 않으면 babel
. 언어 이름은 documentclass 옵션으로 도입할 수 있으며 이는 babel
및 에 모두 적용됩니다 translator
.
참고: 스웨덴어 번역기 사전이 없기 때문에 예제에서는 스페인어를 사용합니다.
\documentclass[spanish]{article}
\usepackage{babel}
\usepackage{translator}
\usepackage{pgfgantt}
\begin{document}
\begin{ganttchart}[
hgrid,
vgrid,
x unit=18mm,
time slot format=little-endian
]{7.1.2013}{13.1.2013}
\gantttitlecalendar*{7.1.2013}{13.1.2013}{
month, month=name, month=shortname, weekday,
weekday=name, weekday=shortname
}
\end{ganttchart}
\end{document}
업데이트:
에 대한 스웨덴어 사전이 공식적으로 존재하지 않는 것 같으므로 translator
소스 파일에 해당 번역을 제공해야 합니다.
\documentclass[Swedish]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage{translator}
\usepackage{pgfgantt}
\uselanguage{Swedish}
\languagepath{Swedish}
\providetranslation[to=Swedish]{January}{Januari}
\providetranslation[to=Swedish]{Monday}{Måndag}
%---- Complete with missing months and days
\begin{document}
\begin{ganttchart}[
hgrid,
vgrid,
x unit=18mm,
time slot format=little-endian
]{7.1.2013}{13.1.2013}
\gantttitlecalendar*{7.1.2013}{13.1.2013}{
month, month=name, month=shortname, weekday,
weekday=name, weekday=shortname
}
\end{ganttchart}
\end{document}