diff --git a/inc/Services/Facet_WP.php b/inc/Services/Facet_WP.php
index c7eeb287..a79b6f31 100644
--- a/inc/Services/Facet_WP.php
+++ b/inc/Services/Facet_WP.php
@@ -90,7 +90,7 @@ public function accessible_facetwp_pager_html( $output, $params ): string {
$output .= '";
if ( $page > 1 ) {
- $output .= 'Précédent';
+ $output .= '' . __( 'Previous', 'framework-textdomain' ) . '';
} else {
$output .= '';
}
@@ -107,16 +107,16 @@ public function accessible_facetwp_pager_html( $output, $params ): string {
for ( $i = 2; $i > 0; $i -- ) {
if ( 0 < ( $page - $i ) ) {
- $output .= 'Page ' . ( $page - $i ) . '';
+ $output .= '' . __( 'Page', 'framework-textdomain' ) . ' ' . ( $page - $i ) . '';
}
}
// Current page
- $output .= 'Page courante ' . $page . '';
+ $output .= '' . __( 'Current page', 'framework-textdomain' ) . ' ' . $page . '';
for ( $i = 1; $i <= 2; $i ++ ) {
if ( $total_pages >= ( $page + $i ) ) {
- $output .= 'Page ' . ( $page + $i ) . '';
+ $output .= '' . __( 'Page', 'framework-textdomain' ) . ' ' . ( $page + $i ) . '';
}
}
@@ -126,13 +126,13 @@ public function accessible_facetwp_pager_html( $output, $params ): string {
if ( $total_pages > ( $page + 2 ) ) {
$output .= '
- Dernière page
+ ' . __( 'Last page', 'framework-textdomain' ) . '
' . $total_pages . '
';
}
if ( $page < $total_pages && $total_pages > 1 ) {
- $output .= 'Suivant';
+ $output .= '' . __( 'Next', 'framework-textdomain' ) . '';
} else {
$output .= '';
}
@@ -157,7 +157,17 @@ public function accessible_facetwp_labels( string $html, array $args ): string {
];
if ( ( true === in_array( $args['facet']['type'], $show_label_not_empty, true ) && ! empty( $args['values'] ) ) || false === in_array( $args['facet']['type'], $show_label_not_empty, true ) ) {
- $html = sprintf( '%s', esc_attr( $args['facet']['name'] ), esc_html( $args['facet']['label'] ), $html );
+ $label = $args['facet']['label'];
+ if ( function_exists( 'facetwp_i18n' ) ) {
+ $label = facetwp_i18n( $label );
+ }
+
+ $html = sprintf( '%s', esc_attr( $args['facet']['name'] ), esc_html( $label ), $html );
+
+ // Add id attribute to per_page select
+ if ( 'per_page' === $args['facet']['name'] ) {
+ $html = str_replace( '