We have a code with the translation of a part of the site. Please note, however, that the translation was done using the google translator. To apply this code to your site, you need to paste into the file your-site.com/wp-content/themes/pniber/functions.php or if you do not have FTP access go to the link "your_site.com/wp-admin/theme-editor.php?file=functions.php&theme=pniber". Find comment Paste your code here
Insert the following code, replacing the inscription "YOUR_TRANSLATE" with the phrases you have already translated. The column on the right shows an example of how this should look like:
/**
* RTL Frontend Translate Fix (replace YOUR_TRANSLATE to your Translation)
*/
function pniber_gettext( $translation, $text, $domain ) {
$translation = str_replace( 'Related Posts', 'YOUR_TRANSLATE', $translation );
$translation = str_replace( 'Read more', 'YOUR_TRANSLATE', $translation );
$translation = str_replace( 'Comments', 'YOUR_TRANSLATE', $translation );
$translation = str_replace( 'Leave a Reply', 'YOUR_TRANSLATE', $translation );
$translation = str_replace( 'Submit comment', 'YOUR_TRANSLATE', $translation );
$translation = str_replace( 'Search...', 'YOUR_TRANSLATE', $translation );
$translation = str_replace( 'Comment', 'YOUR_TRANSLATE', $translation );
$translation = str_replace( 'Website', 'YOUR_TRANSLATE', $translation );
$translation = str_replace( 'Email', 'YOUR_TRANSLATE', $translation );
$translation = str_replace( 'Name', 'YOUR_TRANSLATE', $translation );
$translation = str_replace( 'Load More', 'YOUR_TRANSLATE', $translation );
$translation = str_replace( 'Loading...', 'YOUR_TRANSLATE', $translation );
$translation = str_replace( 'Next Page »', 'YOUR_TRANSLATE', $translation );
$translation = str_replace( '« Previous Page', 'YOUR_TRANSLATE', $translation );
$translation = str_replace( 'Next', 'YOUR_TRANSLATE', $translation );
$translation = str_replace( 'Previous', 'YOUR_TRANSLATE', $translation );
$translation = str_replace( 'Type your keywords...', 'YOUR_TRANSLATE', $translation );
$translation = str_replace( 'Hit enter to search', 'YOUR_TRANSLATE', $translation );
if ( $translation == 'by' ) {
$translation = str_replace( 'by', '', $translation );
}
return $translation;
}
add_filter( 'gettext', 'pniber_gettext', 100, 3 );
/**
* RTL Frontend Translate Fix Arabic
*/
function pniber_gettext( $translation, $text, $domain ) {
$translation = str_replace( 'Related Posts', 'المنشورات ذات الصلة', $translation );
$translation = str_replace( 'Read more', 'اقرأ أكثر', $translation );
$translation = str_replace( 'Comments', 'تعليقات', $translation );
$translation = str_replace( 'Leave a Reply', 'اترك رد', $translation );
$translation = str_replace( 'Submit comment', 'إرسال تعليق', $translation );
$translation = str_replace( 'Search...', 'بحث...', $translation );
$translation = str_replace( 'Comment', 'تعليق', $translation );
$translation = str_replace( 'Website', 'موقع الكتروني', $translation );
$translation = str_replace( 'Email', 'البريد الإلكتروني', $translation );
$translation = str_replace( 'Name', 'اسم', $translation );
$translation = str_replace( 'Load More', 'تحميل المزيد', $translation );
$translation = str_replace( 'Loading...', 'جار التحميل...', $translation );
$translation = str_replace( 'Next Page »', 'الصفحة التالية "', $translation );
$translation = str_replace( '« Previous Page', '" الصفحة السابقة', $translation );
$translation = str_replace( 'Next', 'التالى', $translation );
$translation = str_replace( 'Previous', 'السابق', $translation );
$translation = str_replace( 'Type your keywords...', 'اكتب كلماتك الرئيسية ...', $translation );
$translation = str_replace( 'Hit enter to search', 'انقر فوق الزر إدخال للبحث', $translation );
if ( $translation == 'by' ) {
$translation = str_replace( 'by', '', $translation );
}
return $translation;
}
add_filter( 'gettext', 'pniber_gettext', 100, 3 );