diff --git a/.gitignore b/.gitignore index 485dee64bcfb48793379b200a1afd14e85a8aaf4..7fa5c309d8d45c8492e1a39e80dd38ef4901afaa 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .idea +lang +!lang/*_*.po diff --git a/composer.json b/composer.json index 88e17256195d6d4cfbef4c97ab7b84b54fb86e33..2292b8df2e9eef0d103cc25a21df3d0cd863ae35 100644 --- a/composer.json +++ b/composer.json @@ -15,5 +15,12 @@ "type" : "composer", "url" : "https://gitlab.wpdesk.dev/Dworowy/xxx-hello-world.git" } + }, + "extra": { + "text-domain": "mdworowy-hello-world", + "translations-folder": "lang", + "po-files": { + "pl_PL": "pl_PL.po" + } } } diff --git a/src/HelloWorld.php b/src/HelloWorld.php index 360f40bb3ce6adbabd105b3321dc5d0ea1073256..e897ed7d6d6b57f5add4274b6ec2ebce99c03107 100644 --- a/src/HelloWorld.php +++ b/src/HelloWorld.php @@ -4,6 +4,6 @@ namespace HelloWorld; final class HelloWorld { public static function printHello(): string { - return "Hello World!"; + return __("Hello World!", 'mdworowy-hello-world'); } }