docs(de): finish German guide translation

pull/5477/head
Intense 4 days ago
parent cd5f002b4f
commit 03e5800b20

@ -1,10 +1,10 @@
--- ---
description: Set up internationalization (i18n) in VitePress to Unterstützung mulTipple languages for your site. description: Richte Internationalisierung (i18n) in VitePress ein, um mehrere Sprachen für deine Website zu unterstützen.
--- ---
# Internationalisierung # Internationalisierung
To use the built-in i18n features, one needs to create a directory structure as follows: Um die integrierten i18n-Funktionen zu verwenden, musst du eine Verzeichnisstruktur wie folgt erstellen:
``` ```
docs/ docs/
@ -55,11 +55,11 @@ interface LocaleSpecificConfig<ThemeConfig = any> {
Refer [`DefaultTheme.Config`](https://github.com/vuejs/vitepress/blob/main/types/default-Theme.d.ts) interface for details on eigeneizing the placeholder texts of the Standard-Theme. Don't override `ThemeConfig.algolia` or `ThemeConfig.carbonAds` at locale-level. Refer [Algolia docs](../reference/default-Theme-search#algolia-search-i18n) for Verwendung multilingual search. Refer [`DefaultTheme.Config`](https://github.com/vuejs/vitepress/blob/main/types/default-Theme.d.ts) interface for details on eigeneizing the placeholder texts of the Standard-Theme. Don't override `ThemeConfig.algolia` or `ThemeConfig.carbonAds` at locale-level. Refer [Algolia docs](../reference/default-Theme-search#algolia-search-i18n) for Verwendung multilingual search.
**Pro Tipp:** Config Datei can be stored at `docs/.vitepress/config/index.ts` too. It might help you organize stuff by creating a Konfiguration Datei per locale and dann merge and export them von `index.ts`. **Pro Tipp:** Die Konfigurationsdatei kann auch unter `docs/.vitepress/config/index.ts` gespeichert werden. Das kann bei der Organisation helfen, indem du eine Konfigurationsdatei pro Sprache erstellst und sie anschließend in `index.ts` zusammenführst und exportierst.
## Per-locale Markdown Strings ## Markdown-Zeichenketten pro Sprache
Strings baked in Seites by the markdown renderer - the default titles of [eigene containers](./markdown#eigene-containers) and [GitHub-flavored alerts](./markdown#github-flavored-alerts), and the strings of the code copy button - can be overridden per locale mit the `markdown` key of a locale entry: Vom Markdown-Renderer in Seiten eingebettete Zeichenketten - the default titles of [eigene containers](./markdown#eigene-containers) and [GitHub-flavored alerts](./markdown#github-flavored-alerts), and the strings of the code copy button - können pro Sprache über den Schlüssel `markdown` eines Spracheintrags überschrieben werden:
```ts [docs/.vitepress/config.ts] ```ts [docs/.vitepress/config.ts]
import { defineConfig } from 'vitepress' import { defineConfig } from 'vitepress'
@ -86,9 +86,9 @@ export default defineConfig({
}) })
``` ```
Values falle back to the root-level `markdown` Options wenn a locale leaves them unset. Locale entries can nur override the titles of containers registered at the root level - registering new containers per locale is not supported. Also Hinweis dass since the markdown renderer is erstellt once for the whole site, these can nur be declared in the main config Datei, not in additional configs. Werte fallen auf die `markdown`-Optionen der obersten Ebene zurück, wenn eine Sprache sie nicht festlegt. Spracheinträge können nur die Titel von Containern überschreiben, die auf oberster Ebene registriert wurden. Das Registrieren neuer Container pro Sprache wird nicht unterstützt. Beachte außerdem, dass der Markdown-Renderer einmal für die gesamte Website erstellt wird. Diese Optionen können daher nur in der Hauptkonfigurationsdatei, nicht in zusätzlichen Konfigurationen, festgelegt werden.
## Separate directory for jede locale ## Separates Verzeichnis für jede Sprache
The folgende is a perfectly fine structure: The folgende is a perfectly fine structure:
@ -102,7 +102,7 @@ docs/
├─ foo.md ├─ foo.md
``` ```
However, VitePress won't redirect `/` to `/en/` standardmäßig. You'll need to configure your server for that. Zum Beispiel, on Netlify, du kannst add a `docs/public/_redirects` Datei like this: VitePress leitet `/` jedoch standardmäßig nicht nach `/en/` weiter. Dafür musst du deinen Server entsprechend konfigurieren. Bei Netlify kannst du beispielsweise eine Datei `docs/public/_redirects` wie diese hinzufügen:
``` ```
/* /es/:splat 302 Language=es /* /es/:splat 302 Language=es
@ -110,7 +110,7 @@ However, VitePress won't redirect `/` to `/en/` standardmäßig. You'll need to
/* /en/:splat 302 /* /en/:splat 302
``` ```
**Pro Tipp:** Wenn Verwendung the above approach, du kannst use `nf_lang` cookie to persist user's language choice: **Pro Tipp:** Wenn du den obigen Ansatz verwendest, kannst du das Cookie `nf_lang` verwenden, um die Sprachauswahl des Benutzers zu speichern:
```ts [docs/.vitepress/theme/index.ts] ```ts [docs/.vitepress/theme/index.ts]
import DefaultTheme from 'vitepress/theme' import DefaultTheme from 'vitepress/theme'
@ -141,7 +141,7 @@ watchEffect(() => {
</template> </template>
``` ```
## RTL Support ## RTL-Unterstützung
For right-to-left languages, set `dir: 'rtl'` in the config. The Standard-Theme is laid out mit [CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_Werts), so the layout, the navigation and directional icons follow the dokumentieren direction on their own. No PostCSS plugin is needed; an RTLCSS plugin left in place would flip the mirrored styles a second time, so remove it. For right-to-left languages, set `dir: 'rtl'` in the config. The Standard-Theme is laid out mit [CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_Werts), so the layout, the navigation and directional icons follow the dokumentieren direction on their own. No PostCSS plugin is needed; an RTLCSS plugin left in place would flip the mirrored styles a second time, so remove it.

Loading…
Cancel
Save