poedit | Translations editor for Mac , Windows and Unix | Internationalization library
kandi X-RAY | poedit Summary
kandi X-RAY | poedit Summary
This program is a simple translation editor for PO and XLIFF files. It also serves as a GUI frontend to more GNU gettext utilities (win32 version is part of the distribution) and catalogs editor/source code parser. It helps with translating applications into another language. For details on principles of the solution used, see GNU gettext documentation.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of poedit
poedit Key Features
poedit Examples and Code Snippets
Community Discussions
Trending Discussions on poedit
QUESTION
I was wondering could the use of echo
in php code rather than the use of printf()
be the cause of a .mo file or in general the reason why the translation files do not work at all?
For Example:
In my php code I have this line of code:
echo __('Twinkle Twinkle little star');
Which has the double underscore identifier __()
.
When using Poedit, I get my string displayed in the translatable strings column, so that's not an issue.
Sum up:
Could echo cause a problem with the translation even thought Poedit can index and understand that the string is there?
Thanks in advance for your time.
...ANSWER
Answered 2022-Feb-24 at 20:22echo
and printf
are not related to translations. They are merely ways to output a string.
The translating is performed by the __()
function. So assuming you have your locale set to French with the proper files loaded:
QUESTION
In some languages, the words do not have the same position.
Here is an example:
...ANSWER
Answered 2021-Sep-25 at 11:24Well, I finally found the solution:
QUESTION
I want to use gettext
and poedit
with php
for website translation. I can get poedit
to work but gettext
does not seem to work in my local web dev environment MAMP
, at least I think that is the problem.
My specs:
...ANSWER
Answered 2021-Aug-10 at 23:05The gettext
extensions loaded for CLI SAPI:
$ php -r "echo gettext('hello');"
Web SAPI haven't it: search on the phpinfo page compile flag --with-gettext[=DIR]
- Find extension dir:
php -i | grep extension_dir
(example extension_dir => /usr/lib/php/20190902 => /usr/lib/php/20190902 ) - Find the gettext extension path:
find /usr/lib/php/20190902 | grep gettext
(example /usr/lib/php/20190902/gettext.so) - copy extension from cli dir to web dir:
cp /usr/lib/php/20190902/gettext.so /extension_dir_path
- reload web server
QUESTION
I have a .po file in which the source text is in Spanish and the translation is in English.
I've tried checking around to get this English translation and create a new .po file from it to be translated into Brazilian Portuguese, but I couldn't find anything in POEdit to do so.
Is there any way to do this?
Edit: Just to be more precise, I have the source language as Spanish and the translation as English. I want to use this English translation as the source language in a new file
...ANSWER
Answered 2021-May-30 at 09:19See the File → New from PO/POT file… menu.
QUESTION
I'm trying to localize my website, it is located in a VPS running LEMP Debian 10 (PHP 7.3.27-1~deb10u1). I have spent the day troubleshooting why it's not working with no success.
My project has the following structure:
...ANSWER
Answered 2021-May-28 at 07:48I believe the confusion is that you're using a dynamic domain, based on the language, while the domain is fixed and represents the filename of the translation.
So first of all, reorganise your files as follows
QUESTION
I get a "Source code not available error" whenever i try to extract from source an Html5 source file.
Note that when i change its extention to .php or try to extract from any php file, the existing source code is extracted without errors. Unfortunately, that option is not viable.
Here is the Catalogue properties where the source file paths are configured :
This is the resulting error when trying to extract the source code so that it can be translated in poedit:
...ANSWER
Answered 2021-May-19 at 14:48I solved the problem with the following steps:
- First, Open Poedit and go to File->preferences
- Second, Click on the Extractors Tab and add a custom extractor with the plus sign on the bottom. Mine is already created as you see in the picture.
- Finally add the following values to the relevant fields:
Field 1 = PHP
Field 2 = *.php;.html;.html5
Field 3 = xgettext --language=PHP --add-comments=TRANSLATORS: --force-po -o %o %C %K %F
Field 5 = %f
And that is it. Hopefully you can now add your html or html5 file paths in the catalogue properties and enjoy the Poedit extraction features without any problem.
QUESTION
I've programmed a Lazarus application in German and now I want to translate it into English. So I activated i18n in the project settings and checked "update .po file...". Then, I created a unit uTranslationStrings
and put resourcestring example = 'Beispiel';
before implementation
. I made sure to use
uTranslationStrings, DefaultTranslator, LCLTranslator
in my main unit. Then, I ran the application and opened the projectXY.po
file in Poedit. I translated everything into English and saved it as projectXY.en.po
. I did the same thing for the German locale. Also, I added a language menu entry letting the user switch between German and English.
ANSWER
Answered 2021-Apr-11 at 16:29Here's how I "solved" the problem: I completely deleted the i18n and did everything again (in the exact same way). For some reason, it does work now.
QUESTION
I have translator labels in form types, for example:
...ANSWER
Answered 2021-Apr-01 at 07:54Best Practice is to not translate in form Type class. Try to put untranslated tag there, and translate in template. This not resolve problem with autogenerate '.po' files, but simplifies Type class, ie. not need to inject translator, not need to translate in every FormType class with title attribute field. Otherwise it requires to put translator and translate attributes in every Type class in the future.
Translate form filed attribute in template, require overloading build-in form template as described in Creating your Own Form Theme.
To simplify process in this case:
Copy block
widget_attributes
from build-in template thatis used to own clean template. ie.:templates/form/my_theme.html.twig
Add dthis template to
config/packages/twig.yaml
in tagform_themes
, ie.:
QUESTION
This is a small snippet of my code:
...ANSWER
Answered 2021-Mar-09 at 14:55It is not possible.
And since it would require a major change to the extractor logic to make the comment placement more flexible, it is highly unlikely that this will ever change.
If it is mission-critical for you: Preparse your sources with a little script, and if you find #TRANSLATORS
comments, extract them into a line above the invocation of _()
.
QUESTION
Imagine I have a report, a letter actually, which I need to translate to several languages. I have created a greeting
field in the form which is filled programatically by an onchange event method.
ANSWER
Answered 2020-Dec-10 at 15:54I propose an extension of models res.partner.title
and res.partner
.
res.partner.title
should get a translateable field for saving salutation prefixes like 'Dear' or 'Sehr geehrter' (German). Maybe it's worth to get something about genders, too, but i won't get into detail here about that.
You probably want to show the configuring user an example like "Dear Mr. Name" or something like that. A computed field should work.
On res.partner
you should just implement either a computed field or just a method to get a full salutation for a partner record.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install poedit
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page