-
Author
-
February 2, 2015 at 11:09 #44329alkrossParticipant
Hi, I use child Kleo and code localization plugin
I set in Kleo child functions.php this codeadd_action( ‘after_setup_theme’, ‘my_child_theme_setup’ );
function my_child_theme_setup() {
load_child_theme_textdomain( ‘kleo-child’, get_stylesheet_directory() . ‘/languages’ );I create the language pot for the child theme
I try to translate some string but in the site I saw always the english sentenceFebruary 2, 2015 at 14:24 #44341RaduModeratorTry this code
COPY CODEfunction my_child_theme_setup() { load_child_theme_textdomain( 'kleo-child', get_stylesheet_directory() . '/languages' ); } add_action( 'after_setup_theme', 'my_child_theme_setup' );
Let me know if it works.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 3, 2015 at 17:41 #44577RaduModeratorMake sure that your strings added in the child theme have the kleo-child domain
Example : __( ‘My Custom Text String’, ‘kleo_child’ )Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 4, 2015 at 07:05 #44658alkrossParticipantThe string has ‘buddypress’
I try to change in kleo_child rescan from localization plugin
The string appear under kleo-child with the translation but on the front end I see always the english string
If I set the kleo theme the translation string appears correctly
Thanks youFebruary 4, 2015 at 13:13 #44670RaduModeratorIf the strings belongs ‘buddypress’, you need to translate buddypress plugin.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 5, 2015 at 00:35 #44742alkrossParticipantI’m not sure the problem is to translate buddy press.
I have the translate Buddypress file set in /wp-content/languages/plugins
If I set the kleo theme (not child) the string is translated.I have the same problem with the string in the modal login pop-up
“Log in with your credentials” is translated in kleo-child but on the pop-up I have the english text
Best regardsAttachments:
You must be logged in to view attached files.February 5, 2015 at 14:46 #44816RaduModeratorAfter you translate something, you need press “generate mo file” or you can edit directly php file.
themes/kleo/page-parts/general-popups.php line 9
COPY CODE<h3 class="kleo-pop-title"><?php _e( "Log in with your credentials", "kleo_framework" ); ?>
Let me know if you solve this.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 5, 2015 at 17:27 #44841alkrossParticipantI know that I can translate directly the string into the php page.
I regenerate the mo file
and the mo file has the correct string as you can see int picture attachmentAttachments:
You must be logged in to view attached files.February 5, 2015 at 18:30 #44847RaduModeratorI tested on my site and works well.
I translated that string without problems.
If you wand to take a look closer, i need FTP details.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 6, 2015 at 17:11 #44967RaduModeratorAlso i need admin and password from wp, and htaccess username and password.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 6, 2015 at 18:10 #44985RaduModeratorSee screenshot
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAttachments:
You must be logged in to view attached files.February 9, 2015 at 18:38 #45272RaduModeratorI translated that string via codestyling-localization with no problems.
Check general-popups.php from kleo-child to see that the string is in english also check the codestyling-localization
It’s ok now.
See screenshot
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAttachments:
You must be logged in to view attached files.February 10, 2015 at 06:09 #45353alkrossParticipantThanks Radu, but was wrong?
I saw you translated the kleo .mo files and not the child .mo files
Regards
AlbertoFebruary 10, 2015 at 09:23 #45359alkrossParticipantHi Radu, but for the register.php into /kleo-child/buddypress/members
the localization doesn’t work
RegardsFebruary 10, 2015 at 09:39 #45360alkrossParticipantIn add now I generate the .mo file for the oleo-child, and override the translation in general-popups.php
February 11, 2015 at 14:47 #45587RaduModeratorIt’s ok now ?
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 11, 2015 at 16:38 #45616alkrossParticipantNo:
I sync the child translation and the original kleo and now the text are in english and I lost the translation.
The register page take no translation
I didn’t understand why 🙂
But wpml plugin will resolve this problem?February 12, 2015 at 14:05 #45787RaduModeratorHello,
WPML will not fix this issue, if you lost translations, you need to translate all that strings again and make sure you press generate mo file. It should work !
Watch at this : https://www.youtube.com/watch?v=QK6yNhQdIiI and search on youtube wordpress codestyling localization
I hope you will solve this
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 15, 2015 at 11:49 #46167alkrossParticipantI unserstand this:
If I duplicate a file (for example: general-popups.php)
No translated strings is kept on kleo-child mo file but the theme use only the main strings fileFebruary 19, 2015 at 17:38 #46728RaduModeratorIn this case, translate only from kleo, and files that you copy to kleo-child translate them manualy if you encounter this problem. It should work without problems.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.