Skip to content

Commit

Permalink
Allow customizing PHPageBuilder theme translations
Browse files Browse the repository at this point in the history
  • Loading branch information
HansSchouten committed Jul 3, 2024
1 parent d888724 commit b511f65
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/PHPageBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ public function loadTranslations($language)
if (file_exists($themeTranslationsFolder . '/' . $language . '.php')) {
$phpb_translations = array_merge($phpb_translations, require $themeTranslationsFolder . '/' . $language . '.php');
}

$phpb_translations = phpb_instance(Translator::class)->customize($phpb_translations);
return $phpb_translations;
}

Expand Down
14 changes: 14 additions & 0 deletions src/Translator.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace PHPageBuilder;

class Translator
{
/**
* Return customized translations.
*/
public function customize($translations)
{
return $translations;
}
}

0 comments on commit b511f65

Please sign in to comment.