Own translations in child theme

Home Forums Legacy Support Support queries Translation issues Own translations in child theme

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #59615
    pulidomate
    Spectator
    Hello, I use wplmsblankchild theme and I would like to have my own translations like 'wplms_modern' theme. I have created 'languages' folder with a .pot file but Loco Translate shows me an error "Theme has no POT file. Create one at "/languages/wplmsblankchild.pot" if you need one." Also i have added: function my_child_theme_locale() {     load_child_theme_textdomain( 'wplmsblankchild', get_stylesheet_directory() . '/languages' ); } add_action( 'after_setup_theme', 'my_child_theme_locale' ); In my functions.php but doesn't work. How can i resolve that?
    #59684
    H.K. Latiyan
    Participant
    You do not need to add any code for languages in the child theme. The theme already has the code which first detects the language files in the child theme/languages folder. copy the en_US.po and en_US.mo files from the main wplms theme and place it in the child theme languages folder. Now you can translate the files.
    #59847
    pulidomate
    Spectator
    Ok, thank you for clarifying that.
    #59872
    pulidomate
    Spectator
    I have tested it and it works, but i can't translate via Loco Translate because not shown the language.
    #60062
    H.K. Latiyan
    Participant
    You can add a new language, refer:  http://prntscr.com/bwgbw2 Then try to sync the files and then translate the strings.
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Own translations in child theme’ is closed to new replies.