This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends 'base.html.twig' %} | |
{% block body %} | |
<p>{{ date|localizeddate('medium', 'none') }}</p> | |
<p>{{ number|localizednumber }}</p> | |
<p>{{ price|localizedcurrency('EUR') }}</p> | |
{% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | |
use Symfony\Component\Routing\Annotation\Route; | |
use Symfony\Component\Translation\TranslatorInterface; | |
class ExampleController extends AbstractController |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
_defaults: | |
public: false | |
autowire: true | |
autoconfigure: true | |
#Twig\Extensions\ArrayExtension: ~ | |
#Twig\Extensions\DateExtension: ~ | |
Twig\Extensions\IntlExtension: ~ | |
Twig\Extensions\I18nExtension: ~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends 'base.html.twig' %} | |
{% block body %}<h1>{{ 'hello'|trans }} {{ name }}</h1>{% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | |
use Symfony\Component\Routing\Annotation\Route; | |
use Symfony\Component\Translation\TranslatorInterface; | |
class DefaultController extends AbstractController | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
controllers: | |
resource: ../../src/Controller/ | |
type: annotation | |
prefix: /{_locale} | |
requirements: | |
_locale: '%app_locales%' | |
defaults: | |
_locale: '%locale%' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put parameters here that don't need to change on each machine where the app is deployed | |
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration | |
parameters: | |
locale: 'en' | |
# This parameter defines the codes of the locales (languages) enabled in the application | |
app_locales: en|fr|de|el | |
services: | |
# default configuration for services in *this* file | |
_defaults: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"home.component-based": "Βασισμένο σε στοιχεία", | |
"home.component-based.p1": "Δημιουργήστε ενσωματωμένα στοιχεία που διαχειρίζονται τη δική τους κατάσταση, και στη συνέχεια συνθέστε τα για να δημιουργήσετε σύνθετα UI.", | |
"home.component-based.p2": "Δεδομένου ότι η λογική συνιστωσών είναι γραμμένη σε JavaScript αντί για πρότυπα, μπορείτε εύκολα να περάσετε πλούσια δεδομένα μέσω της εφαρμογής σας και να κρατήσετε την κατάσταση εκτός του & nbsp; DOM.", | |
"home.declarative": "Δηλωτικό", | |
"home.declarative.p1": "To {name} καθιστά ανώφελη τη δημιουργία διαδραστικών διεπαφών χρήστη. Σχεδιάστε απλές προβολές για κάθε κράτος στο δικό σας εφαρμογή και το React θα ενημερώσει αποτελεσματικά και θα αποδώσει τα σωστά στοιχεία όταν τα δεδομένα σας αλλαγές.", | |
"home.declarative.p2": "Οι δηλωτικές προβολές καθιστούν τον κώδικα πιο προβλέψιμο και πιο εύκολο στον εντοπισμό σφαλμάτων.", | |
"home.welcome": "Καλώς 'Ηρθατε στο {name}!" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {Trans} from "@lingui/macro" | |
import logo from './logo.svg' | |
import './Home.css'; | |
const Home = ({name}) => { | |
return ( | |
<div className="Home"> | |
<div className="Home-header"> | |
<img src={logo} className="Home-logo" alt="logo"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"localeDir": "src/locales/", | |
"srcPathDirs": ["src/"], | |
"format": "minimal", | |
"fallbackLocale": "el", | |
"sourceLocale": "en" | |
} |