admin管理员组文章数量:1122846
I want to add a string to a pot document for language, but it says there’s an error. I have opened file .pot with a text editor and I have add this code
#:D:\Programe\InstantWP\InstantWP_4.3.1\iwpserver\htdocs\wordpress\wp-
content\themes\sydney-child/category-38.php:56
msgid “”
“Read more”
msgstr “”
while in my file I have add this one
<?php _e( ‘Read more’, ‘sydney-child’ ); ?>
Then I have downloaded file .pot and I have opened it with Poedit, I have add the translation “Read more”, but when I update it says: “Source code not available. Translations can’t be uploaded by source code because there is no source code in the path specified in catalog properties” (the message was Italian, so I hope to have well translated in English)
Can anyone help me? Thanks
I want to add a string to a pot document for language, but it says there’s an error. I have opened file .pot with a text editor and I have add this code
#:D:\Programe\InstantWP\InstantWP_4.3.1\iwpserver\htdocs\wordpress\wp-
content\themes\sydney-child/category-38.php:56
msgid “”
“Read more”
msgstr “”
while in my file I have add this one
<?php _e( ‘Read more’, ‘sydney-child’ ); ?>
Then I have downloaded file .pot and I have opened it with Poedit, I have add the translation “Read more”, but when I update it says: “Source code not available. Translations can’t be uploaded by source code because there is no source code in the path specified in catalog properties” (the message was Italian, so I hope to have well translated in English)
Can anyone help me? Thanks
Share Improve this question asked Sep 23, 2017 at 16:02 maria russomaria russo 211 silver badge4 bronze badges1 Answer
Reset to default 0Well, the way I work with Poedit is:
- Open Poedit
- Open the .pot file with Poedit
- Define the language of the translation
- Find the info you want to translate on the left collumn
- Place the translation on the right collumn
- Save the .po
- Compile the .mo
- Save both on the 'language' folder of the theme
Since you are trying to create a term where it doesn't exists, the second line of your first step looks incorrect.
#: theme-name.php:123 // the reference
msgid "Page Title" // the original term
msgstr "" // the translation
Reference: https://developer.wordpress.org/themes/functionality/localization/
本文标签: translationAdd a string to file pot using Poedit
版权声明:本文标题:translation - Add a string to file .pot using Poedit 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736286777a1927740.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论