Skip to content

Commit

Permalink
Add app snippet guide
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelbrode committed Feb 21, 2024
1 parent c3d3015 commit 5697574
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions guides/plugins/apps/administration/adding-snippets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
nav:
title: Add translations for apps
position: 30
---

# Adding translations for apps

Adding snippets to the administration works the same way for plugins and apps. The only difference is the file structure and that apps are not allowed to override existing snippet keys. The only thing to do, therefore, is to create new files in the following directory: `<app root>/Resources/app/administration/snippet`
On top of that, you need JSON file for each language you want to support, using its specific language locale, e.g. `de-DE.json`, `en-GB.json`.

Since everything else works the same, please refer to our [Adding translations for plugins](../plugins/administration/adding-snippets) guide for more information.
4 changes: 2 additions & 2 deletions guides/plugins/plugins/storefront/add-translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ nav:

---

# Add Translations
# Add translations

## Overview

Expand Down Expand Up @@ -41,7 +41,7 @@ Now that we know how the structure of snippets should be, we can create a new sn

Here's an example of an English translation file:

```js
```json
// <extension root>/src/Resources/snippet/en\_GB/example.en-GB.json
{
"header": {
Expand Down

0 comments on commit 5697574

Please sign in to comment.