I want to have "Page X of Y" in the footer, but I also want it to be flexible for other languages. I know I can do

```
\providecommand{\pagename}{Page}
\usepackage[german]{babel}
...
\pagename

```

which will display `Seite` instead of `Page` because of babel. What I want is something similar to `of` so that I can write:

```
\pagename \thepage{} of \pageref{LastPage}

```

with the appropriate macro instead of `of` so that when I switch to german (or any other language), the `of` will also switch to the appropriate language.

MWE:

```
\documentclass{article}
\usepackage{hyperref}
\usepackage{fancyhdr}
\usepackage{lastpage}
\providecommand{\pagename}{Page}
%\usepackage[german]{babel}

\fancypagestyle{custom}{%
    \fancyhf{}% clears the footer and header
    \fancyfoot[c]{\pagename \thepage{} of \pageref{LastPage}}
}%

\pagestyle{custom}

\begin{document}

foo baz baa, this is a document

\end{document}

```