Skip to content

Commit c988f9b

Browse files
authored
Setup Translation Service
EA-3236: Add Environment variables for Translation Service
2 parents 93df88f + 07afe5c commit c988f9b

File tree

5 files changed

+207
-17
lines changed

5 files changed

+207
-17
lines changed

.env.dist

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ LOG_FILE=./var/channel.log
4444
TEMPLATE_DIR=./template
4545
TEMPLATE_CACHE=./var/cache/template
4646

47+
# ##################################
48+
# Symfony Translations
49+
#
50+
# file names inside TRANSLATIONS_DIR must be type YAML.
51+
# The filename (exlusive extension) is the locale (e.g. de_DE)
52+
TRANSLATIONS_DIR=./translations
53+
DEFAULT_LOCALE=de_DE
54+
4755
# ##################################
4856
# Channel specific stuff starts here
4957
# ##################################

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
"require": {
55
"symfony/console": "^5.0",
66
"symfony/dotenv": "^5.0",
7-
"jtl-scx/channel-core": "^0.27",
7+
"jtl-scx/channel-core": "^0.30",
88
"monolog/monolog": "^2.0",
9-
"twig/twig": "^2.0"
9+
"twig/twig": "^2.0",
10+
"jtl-scx/channel-api-client": "^0.24.0"
1011
},
1112
"require-dev": {
1213
"phpunit/phpunit": "^9.0",

composer.lock

Lines changed: 190 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Demo/MetaData/SellerAttributeLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
namespace JTL\SCX\Channel\Demo\MetaData;
1010

1111

12-
use JTL\SCX\Lib\Channel\Contract\MetaData\SellerAttributeLoader as SellerAttributeLoaderAlias;
12+
use JTL\SCX\Lib\Channel\Contract\MetaData\SellerAttributeLoader as SellerAttributeLoaderInterface;
1313
use JTL\SCX\Lib\Channel\MetaData\Attribute\AttributeList;
1414

15-
class SellerAttributeLoader implements SellerAttributeLoaderAlias
15+
class SellerAttributeLoader implements SellerAttributeLoaderInterface
1616
{
1717
public function fetchAll(string $sellerId): AttributeList
1818
{

translations/de_DE.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Add your translations here
2+
Beer: Bier
3+
Wine: Wein
4+
Schnaps: Schnaps

0 commit comments

Comments
 (0)