WordPress Plugin: Codestyling Localization (en)
| WordPress Version: | WordPress 2.5 or later |
| PHP Version: | PHP 4.4.2 or later |
| tested Browser: | IE7 | FireFox 2.0.0.16 | Opera 9.27 | Safari (Windows) 3.1.2 |
| not supported Browser: | Google Chrome (javascript engine buggy) |

While get in touch with WordPress you will find out, that the initial delivery package comes only with english localization. If you want WordPress to show your native language, you have to provide the appropriated language file at languages folder. This files will be used to replace the english text phrases during the process of page generation.
This translation capability has the origin at the gettext functionality which currently been used across a wide range of open source projects. The basics of this system are documented Free Software Foundation (FSF) - GNU Project - gettext and can be read there.
The basis for translations are language files defined as *.po format (portable) or *.mo format (machine object), which helps software to get translated on the fly.
The *.po files are pure text format and must meet a dedicated specification to be analyzable by software programs. Normally you would take a texteditor for translation or a specific editor like PoEdit, which have to be installed on your PC first. Using such an editor you can translate *.po files and generate the resulting *.mo files out of. All software products based on gettext are only able to deal with *.mo files at production level (live mode).
In my opinion the effort to localize as example a plugin is too high, because you need the plugin at your local PC and a PoEdit installed. You will translate some phrases, generate a *.mo file and finally upload it. But after inspectation in real live you will encounter such things like to big label texts or small mistakes. And you will repeat this always including that file upload again.
This recurring process is counterproductive and time wasting. So i tried to create a solution which integrates into administration GUI of WordPress, can simply manage and translate any component. The translation results can be controlled immediately using a second browser tab containing the target page.
The Plugin Mainpage - The Beginning
If you have plugin installed and activated, you will get a new menu entry inside “Manage” which is named “Localization“. If you choose the entry, you will get the complete overview about all components of your WordPress installation, that are gettext ready or having already language files on board.
This plugin inspects WordPress itself, all plugins out of plugins folder and also all themes out of theme folder. Only those components will be listed that are really gettext ready and can handle translation files.
You can perform several actions per component (WP | Plugin | Theme) and language. If your choosen component already have had translation files, they will be listed with informations about. Files marked with white
indicates, that those are not existing.
A red marked file
indicates, that it permits readonly access and thatswhy it can’t be written.
Files marked with green color
will show you, that you can read and write it.
All read-only files can be turned into read-write access, if you click at the red symbol. This will be done at several internal steps. First the plugin tries to set the permissions to rw-/r–/r– at this file. If this is not enough to be able to write onto, it tries next to set the permissions to rw-/rw-/r– and if this also fails, finally the permissions rw-/rw-/rw- will be tried. If all that fails totally, you will get an error message box and you have to adjust it using your FTP account. At success case the color of file changes to green and you can use it. This permission change feature is only provided for read-only files.
The Plugin Mainpage - Add New Language
If your prefered language doesn’t exist, you can simply add it. The occuring dialog lets you choose your new language but will skip those already existing for the target component. After you have filled the last translator field (defaults to current logged on WordPress user) and made your choise, the related *.po file will be creates at the target components folder. The new language immediately shows up at language list and can be handled now by further actions. The new file doesn’t contain any catalog entry except the correct file header nessessary for translations.
The Plugin Mainpage - Rescan PHP Source Files
After you have added your new language you will need the text phrases to be able to translate something. Rescanning the PHP source files extracts this text phrases and saves them at *.po file (quite similar to PoEdit). But the plugin performs an intelligent search / analysis process and scans only component related files.
If you want as example rescan the WordPress itself using PoEdit you will get a mixed translation file, containing also any custom plugin or theme phrases.
But this plugin performs intelligent: in case of WordPress itself the scan process skips the complete plugin and theme folder and only explicite adds Akismet and the themes provided at WordPress install package. This ensures that only WordPress related phrases will be attached to that language file and never attach the phrases of plugin XY too.
This process can take some seconds upto minutes, depending on your connection speed and the count of files to be processed. The progress will be shown until all has been scanned. After successful rescan the *.po file will contain all found phrases based at gettext functionality. If you run the scan process at an already existing *.po file, the file gets updated.
No worry about maximum execution time setting of PHP. This process is ajax driven, so you will not have problems related to runtime restrictions.
The Plugin Mainpage - Delete Language
Deleting a language really implies physical erase! Thatswhy you will get a dialog and must confirm this action. After confirmation both files *.po and *.mo will be erased from harddisk. You can abort the confirmation dialog and avoid erase by clicking upper right corner close button.
The Plugin Mainpage - Launch Translation Editor
If you hit the “Edit” action, the view switches into language editor mode. This build-in editor allows the translation of any contained catalog phrase and also produces the *.mo file on your needs.
The Translation Editor
The editor has been designed as comfortable as possible and permits the complete language file catalog editing. After launch it displays the first 100 entries as default out of the *.po file. You can choose the count of entries per page and also the page itself by your needs.
Every entry at the language file will be shown at it’s own row. The left column shows upto 2 possible items:
- PHP symbol - shows the source files containing the text and opens a preview dialog at source file and line
- comment symbol - if the file contains a comment, it will be displayed here
The next 2 columns containing the original text and the translation target text. The last column provides some actions, currently only the action: edit entry.
If you edit an entry, you will get one out of 2 possible edit dialogs. The gettext functionality supports on the one hand side simple text phrases with 1:1 relationship. On the other hand side it supports also plural forms but they have 2:n relationship. The english language knows singular and plural. But several target languages have more or less differences, some support only 1 form (2:1) but other may support upto 4 different pluralizations (2:4). Thatswhy a special dialog will be shown, that handles this fact and shows the formula behind the plural index calculation too.
As can be seen at the screenshots, the dialog supports also translations assisted by Google Translate API. But it will be available only, if the target language is supported by Google. Clicking this link translates the original text by Google Translate API and writes the result into the translation target field. You should handle this as suggestion because in most cases you have to rework it.
Event though Google Translate keeps the HTML markup unchanged, it may often happen, that formatter like %s gets exploded and filled by space character. This is dangerous at formatting functions inside PHP, because the values to be later inserted won’t show up or you script may crash. This also happens if you have backslashed text. The backslashes gets multiplied. You have always to check those translation results carefully.
Both search fields at table head can be used to find matches at the choosen column. This is an exact match search, keep in mind. During typing the seach phrase the number of shown target rows will be reduced on the fly. This search runs always over all language file entries and shows all matches.
Pressing the button “generate mo-file” converts the edited *.po file and saves it additional as new binary *.mo file. An existing *.mo file will be overwritten. In success case the change date beside the button will be refreshed and highlighted.
If you open an additional browser tab with your page subject of your translation, you can check instantly if your changes looks as expected. This online control is useful because sometimes the provided space for labels is not wide enough and you have to find an shorter translation phrase.
All entered translations will be saved during pressing the “Save” button at dialog. Your changed phrases will always made persistent at the *.po file. So you can continue your translation later on too without loosing anything.
Plugin Limits
This plugin currently only supports languages, that have been stored at internal definition sets. This has been done to ensure the correct usage of plural form definitions automatically. Secondly it supports only languages having the country specifier included such xx_XX. Thatsways following language examples won’t be detected nor supported:
- sitemap-ja.po
- sitemap-ja_JA.UTF-8.po
- sitemap-ja_SJIS.po
This will be part of later versions and gets a complete extension than.
Plugins that are gettext ready but having no language file contained yet may store the new created languages files at the main folder of plugin instead of its dedicated language folder. This will happen if the language path can’t be detected qualified from source code. If you provide at least an emtpy language file at the target plugins language folder, the correct path will be extracted from this existing file and new languages will now be created a the right sub folder. Upcomming versions will introduce this as choise inside the creation dialog for such cases.
At some plugins the text domain can’t be detected. This happens if the plugin writer did not use text or constants for the textdomain. In such cases the name of the plugin file (without the .php extension) will be used. For this issue i have currently no solution.
Installation
Decompress the plugin and upload the complete folder csp-po-edit with all content as sub folder at /wp-content/plugins/. Now you will find the plugin at the menu “Plugins” named Codestyling Localization and can be activated.
During activation the plugin checks the required WordPress and PHP version. If at least one of this tests fails, the plugin can not be activated and reports the issue as can be seen at screenshot.
The plugin does not require any configuration and does not change your database nor content. It works “out of the box” if you meet the above named requirements.
Version History
| 2008-06-21 | 0.10 | start of coding |
| 2008-08-25 | 0.95 | Beta Release (1st closed test) |
| 2008-08-26 | 0.96 | Beta Release (2nd closed test)
|
| 2008-08-27 | 0.97 | Beta Release (3rd closed test)
|
| 2008-08-28 | 0.98 | RC1 release
|
| 2008-08-30 | 0.99 | RC2 release
|
| 2008-09-02 | 1.0 | 1st public release
|
| 2008-09-03 | 1.01 | release
|
| 2008-09-05 | 1.02 | release
|
| 2008-09-07 | 1.1 | release
|
| 2008-09-11 | 1.2 | release
|
| 2008-09-11 | 1.21 | release
|
| 2008-09-14 | 1.30 | release
|
| 2008-09-15 | 1.51 | release
|
| 2008-09-23 | 1.55 | release
|
| 2008-12-02 | 1.60 | release
|
| 2008-12-08 | 1.65 | release
|
Actual Download
Plugin Version: codestyling-localization-v1.95.zip (3553 downloads)
Support
It’s planned to lauch a Bug-Trac and user forum. But currently i have no time to setup both. Thatswhy please contact me by email, but keep in mind, that response may take some time. Any mail related to this plugin will be answered.
Hint: Because sometimes the question appears, that plugins or themes doesn’t get detected as translatable, this often caused be the fact, that they use variables as textdomain specifier. If the author would have been using constants, the parser would be able to find them. Example:
| PHP | |
1 | define('MY_TEXTDOMAIN', 'my_domain'); |
| timing: 0.079s | |








Baron
12.09.2008 | 00:37hi. Thanks for plugin
perfect but demo ?
Regards
reply »
codestyling
12.09.2008 | 00:47If you think about a how to use demo as flash video, i’m working on that and will publish this as soon as possible. I hope, that all possibly open questions will be answered than.
I also think about an english tutorial, how to get a hard coded plugin/theme gettext ready.
reply »
noname
12.09.2008 | 13:40unbelievable and great plugin. I would love this also as general PHP aplication for including in other projects using gettext.
I have just small bits for improving
a) possibility to copy the original text (i use it almost always when there are variables in the text, and for some abbreviations), or text from other language
b) possibility to copy the text for plural(s) from singular where available
c) sort by differences in the texts, + copy, so easy translating the same or very simillar texts
anyway it is definitely great great great, one of my top 3 plugins
reply »
codestyling
12.09.2008 | 14:11Thanks for this feedback and the suggestion about improvement. The points a) and b) sounds link a good idea, i will support it with next upcomming version, hopefully. The last point c) is not really specific, do you want to:
- sort all rows by text compare driven by column ?
- sort of search hits by text compare driven by column ?
- anything else i did not understand ?
reply »
noname
15.09.2008 | 10:48hmm, that’s hard question. Do not know the best sollution, maybe you will imagine some.
I will first try to describe the problem: there are many sentences, which differs just by one word, etc. e.g.:
Files:wp-admin/edit-page-form.php:235
Setting a password will require people who visit your blog to enter the above password to view this page and its comments.
Files:wp-admin/edit-form-advanced.php:339
Setting a password will require people who visit your blog to enter the above password to view this post and its comments.
So it would be great to show those simillar sentences to the user, and even allow copy translations between them, so he would keep the translations consistent. Maybe the best would be to show it somwhere directly in the edit window, but i do not know how it would be possible (you would have to compare a string with all the others and match the ones with high simillarity etc. and i do not know if it is even possible and fast enough)
reply »
codestyling
15.09.2008 | 10:57Now it’s clear what you think about. Both sentence differe only in ( page | post ) but the rest remains similar. This may be a job for phonetic similarity (soundex search) cause this sentences may produce a very high matching value. Direct text compare may also an option, but how to decide similarity ?
I will think about it and provide a solution if i found a reasonable way to do this.
reply »
noname
12.09.2008 | 13:56small bug: plugin cannot be used in Google Gears - edit etc. buttons (with onlclick javascript) do not work
reply »
codestyling
12.09.2008 | 14:13ok, i will check this. currently i don’t use gears, because it forces extreme side effects on other plugins and also WP cache strategies. will be checked asap.
reply »
noname
15.09.2008 | 10:51maybe one more improvement -> allow serial translation with some “Save and next untranslated” button, so you would not have to always go to main screen and click the next untranslated and click edit
reply »
codestyling
15.09.2008 | 11:02Good point, and would not be very difficult except you edit the last one on page. After “Save and Next Untranslated” the main screen has to switch the page automatically to step into first row now becomes new subject of translation.
It’s now on the road map for upcomming versions.
reply »
FYGureout
17.09.2008 | 16:38Thank you for a great plugin and work!
reply »
noname
18.09.2008 | 22:17thank you. I have one offtopic question - is this system for working with .po, .mo files accessible also for non wordpress projects? I am using poedit, but it is so stupid… the best for me now is probably install there wordpress as well and generate .pot myself and then use your system
reply »
codestyling
19.09.2008 | 00:35As long as this Projects are GPL too, there is no reason to deny the porting. It should be possible to adapt it into several CMS and Blog systems beside WP based at PHP.
I have a question too: would it be possible to get a translation file at your native language for this plugin too?
I would pre-package it at next update and remark your work at the plugins Acknowledgement page at wordpress.org (needs link and text you prefere)
reply »
noname
01.10.2008 | 13:28definitely, i will post it as soon as i will have it ready (missing last 90 terms)
reply »
Colovic Vladan
01.10.2008 | 04:21This is really something that I always wanted to have. Thank you for your efforts.
reply »
noname
01.10.2008 | 13:30just explanation - i am translating wordpress and plugins, so last 90 terms of wordpress + this plugin, not 90 of this plugin only
i guess i will have it finished both till end of this week
reply »
noname
01.10.2008 | 13:32and one more question - maybe it would be nice to global translate using google translator of all terms at once. And it would be great if i could change which language would be then used as the “from” language (as for many languages it is better to translate from other language then english - best is to select the language from the same language-family)
reply »
codestyling
08.10.2008 | 13:51Sorry, i was on vacation for 2 weeks an have to compensate now the freezing shock
Google blocks IP’s, if they abuse the translation interface! If the plugin would try to translate the whole language file at once (some plugins have more than 500 terms like mailing list plugins), this results in abuse detection and IP blocking by Google Translation.
Because of Cross Site Script ing Protection feature of most browsers the Google API will be called by you domain machine and only routed to the page o plugin (like proxy to go around protection). This would block you complete domain for this service. Thatswhy i have no intention to implement it in this way.
The selection of source language may be a good idea but this could only be a work-arround. Basically the main language has been defined as english. Choosing a different can only be an other mo or po file. But how should the plugin detect, that as example the french mo is up to date ?
reply »
pablo
15.10.2008 | 00:02Hi, I am using this bran new theme… check it out here http://blogueros.tv/... i have rescanned all files but as you can see i am not capturing a lot of the english strings. Also in the localization page i don’t see the active theme. I see many themes except the one active. Thoughts?
reply »
codestyling
15.10.2008 | 10:31This theme can’t be freely downloaded so i can’t check the reason qualified.
I think, the theme is like may pay-ware hard coded in english and not prepared to support different language files. If the theme doesn’t occure at the main page of localization plugin, than it doesn’t try to load a language file and this may be reason for impossible translation too.
If you could provide the theme by mail (i will only use it for investigation reason) than you would get more detailed informations about.
reply »
pablo
23.10.2008 | 03:03sure send me an email and I will reply back with the theme.
reply »
Keopx
16.10.2008 | 20:12I have got modify the plugin with the Basque locale.
If you need or add to the plugin, please contact with me.
Thank for you work!!!
reply »
pablo
23.10.2008 | 03:01Hi,
all the active themes and many of the plugins i have don’t appear in the translation page (wp-admin/edit.php?page=codestyling-localization/codestyling-localization.php). Do you recognize this problem? Please let me know. thanks,
.pablo
reply »
Rui Shen
18.11.2008 | 15:32Hi,thanks for you nice plugin,I just use it.it’s very good,so I have translated it into simplified Chinese。
I want you add it into this plugin。It’s here codestyling-localization-zh_CN
reply »
codestyling
18.11.2008 | 15:39It’s planned to make i minor refresh containing several additional languages within a few days.
A new improved and extended version have been planned until Christmas because of heavy workload and job dependend needs
reply »
Yves
23.11.2008 | 00:51Hi Heiko,
Thanks for this fantastic work. How long did you spend?
I would really like to use your work for another cms. It could be great to get a basic version without wordpress for guys like me which would like to understand and reused it. If you agree of course!!!
I tested a little bit your program and if I understand well the argument in the function to transale (_e(”hello …”)) must be a string, not a variable.
reply »
ovidiu
28.11.2008 | 08:16hello
I love your plugin but I’d like to sugest some improvements:
- I am using it on wpmu 2.6.1 and it works perfectly. The only problem I have is that it is not really picking up all plugins, so I wanted to back check where it looks for plugins. wpmu also stores plugins in the folder mu-plugins instead of plugins as those are automatically activated. Also maybe an option where one could specify additional folders would be awesome, as in wpmu installations sometimes plugins are put in different folders i.e. I have another folder inside wp-content called admin-plugins which are only activated in the backend, no need to call them the whole time in the front end too
reply »
codestyling
01.12.2008 | 12:56The update comming soon will contain bugfixes for US versions not containing a languages folder, WP2.7 CSS changes and also the initial support of WPMU plugins folder (standard folder, not the hack based admin plugins folder).
reply »
ovidiu
02.12.2008 | 09:10I really hope you did not misunderstand me, I am only interested in your plugin scanning mu-plugins folder for plugins, not running from there. if it is run from there all users could create/delete localizations, etc.
reply »
codestyling
02.12.2008 | 11:30The new version currently been tested runs out of normal plugins folder as before but it scans now the mu-plugins folder additionally. All WPMU plugins will be listed at new main categorie and will be named as WPMU Plugins. Also the WordPress main localization shows now 2 version numbers in case of WPMU: the original WP version and the WPMU version.
The MU Plugins will be supported only as single file *.php, any subfolders will be ignored.
I think, this is what you expect, isn’t it ? (comming soon, next few days)
reply »
ovidiu
02.12.2008 | 14:08almost perfect
can’t you let the scanning of subfolder active? plugins don’t run out of subfolders inside mu-plugins, but a lot of plugins are adapted to wpmu in the way that the main plugin file is located inside mu-plugins folder while the rest of the plugin resides inside a folder best example would be donncha’s wp suepr cache, this is an excerpt from the isntall instructions:
# If you are using WordPress MU you will need to install this in ‘wp-content/mu-plugins/wp-super-cache/’ and the file wp-cache.php must be copied into the mu-plugins directory.
reply »
codestyling
02.12.2008 | 15:08This is by design (concept) of WP. All plugins be located at main plugin folders (plugins or mu-plugins) will be handled as single file plugins. The WP core supports sub folders to be able to run plugins out of them but requires also the main plugin file be located inside.
After inspectation of WPMU code i found, that management of mu-plugins has been coded very terrible!
I would have expected, that it also supports scanning and using sub folders as ordinary plugin folder does, but it is only a HACK in my opinion. That’s why i dont support yet sub folders.
The cache plugin you named doesn’t support any localization, all text phrases are hard coded inside. So it would not be translateable without code changes.
I would prefere a re-written mu-plugin interface inside WMPU version, that must supports:
- new administration GUI for site admin
- configuration option, if a WPMU plugin may run in backend / frontend or both
- subfolder handling like ordinary plugin support.
If i have more time, i will contact the WPMU team to present a solution, that is more similar to normal plugin management but designed for mu-plugins.
reply »
ovidiu
02.12.2008 | 17:01thx
you really impressed me. most plugin developers, don’t really care or know about wpmu. you seem to have informed yourself very good and you seem to want to offer a proper solution
WOW. thanks for any support you can give and looking forward to the next version.
reply »
ovidiu
03.12.2008 | 11:00with the new 1.6 version I am getting this error:
using wpmu 2.6.1 and only on the “all translations” and “mu plugins” tab
reply »
codestyling
03.12.2008 | 12:03Sorry, my mistake. Because i simulate the mu-plugins using ordinary WP version, i don’t get the fact, that the array was not present.
Please insert as short fix (word arround) at line 441 following:
$const_list = array();I will update the version again this night to reflect this too. -> leads to 1.61 than.
reply »
ovidiu
03.12.2008 | 14:16sorry I am not sure what you meant me to do so I will just wait for the next version
my line 441 is :$content = file_get_contents($file);
reply »
codestyling
03.12.2008 | 22:30original fragment:
439 $file = WPMU_PLUGIN_DIR.’/’.$plug;
440
441 $content = file_get_contents($file);
new fragment:
439 $file = WPMU_PLUGIN_DIR.’/’.$plug;
440
441 $const_list = array();
442 $content = file_get_contents($file);
This should handle this bug as work arround. Official bufix follows asap.
reply »
ScorpAL
11.12.2008 | 11:15Does not work with Google Chrome browser ^(
reply »
codestyling
11.12.2008 | 12:38Ok, i have tested it now. Because i have no permission to use Google Chrome, i didn’t gave it a try. After testing it at a friends system, i see what you mean. Some links would not be supported by chrome, they don’t execute onlick() handler. I will cross check this using new Safari too, cause Chrome and Safari share the same WebKit base. If it’s WebKit issue, it should occur at Safari too.
Nevertheless i will make it working with the next minor update comming. Thanks for reporting.Appendix: After searching the reason and many Google requests the problem is the interoperability between Chrome and prototype.js (and potential other js libraries). As long as Chrome won’t be able to work with the same library other browsers are able, i won’t spend time therefore. Moreover this would require a patch of WP shipped js files, get damaged at next WP update again. So i will update the Plugin Page to state that Chrome is not working.
reply »
Georg
11.12.2008 | 11:53Hi! A great work of coding, thanks a lot! That said, aren’t you using non-standard locals?
WP Deutschland got it wrong in the first place with de_DE (instead of de-DE with a dash) and now you’re forcing speakers of other languages to use proprietary codes which no software in the world can recognize when included in the lang=”…” or xml:lang=”…” attributes.
Moreover, the RFC 4646 states, “Interoperability is best served when all users use the same language tag in order to represent the same language. (…) Subtags should only be used where they add useful distinguishing information,” meaning, for French one should tag a document with fr rather than fr-CH. The document also recommends the use of script subtags zh-Hant/zh-Hans for Traditional/Simplified Han Characters respectively, as opposed to region subtags (zh-TW, zh-HK, zh-CN, zh-SG, …).
Given the number of language codes available, it would be hard to offer an exhaustive list anyway. So, rather than forcing users to select an incorrect language tag from your list, extract their bloginfo(’language’) defined in wp-config.php and use it as a default.
reply »
codestyling
11.12.2008 | 12:53Sorry, you are not right. The implementation of WordPress core function get_locale() is written at /wp-includes/l10n.php line: 28ff (WP2.7) as:
function get_locale() {
global $locale;
if (isset($locale))
return apply_filters( 'locale', $locale );
// WPLANG is defined in wp-config.
if (defined('WPLANG'))
$locale = WPLANG;
if (empty($locale))
$locale = 'en_US';
$locale = apply_filters('locale', $locale);
return $locale;
}
As you can see, WPLANG is been used as locale (in missing case as ‘en_US’) and with notation of locales used for dealing so.
As references please look at Debian supported locales, DB 2 locale settings, Google Adsence API locales and many other more (PHP setlocale() function as example).
There have to be made a difference between locales and language codes used in HTML / XML. They are different in notation and you should be aware that xml:lang is something different than a locale code.
Selection of used language out of blog settings only is not a good idea, because there are some user familar with at least 2 languages other than english and they are able to translate 2 language files. That’s why it can be freely choosen.
I understand your wish of interoperability but it’s not the fault of WPD, that it had been introduced, it’s common definition made years ago as web work was not so expansive as today.
reply »
Georg
12.12.2008 | 10:45Thank you for the links, you are right, I didn’t know about how Debian handles locales internally. For use on the internet, however, this remains non-standard. On the Adsense site which you are referring to, it says that only “a few of the codes (such as zh_CN) contain locale-specific codes”, and that these could just as well have a hyphen-minus in lieu of an underscore. There is no mention of de_DE, fr_Fr, … in their list whatsoever. It would be more specific than necessary.
Many of the existing localizations for WP have been using locales which do not correspond with your scheme, and rightly so. If they don’t want to alter their 2-letter language code, how can they use your excellent plugin? Maybe you could provide an input field so one could add more languages to the list.
(On a side note, I oppose the idea of regarding languages as a “national property”, and the W3C doesn’t recommend the use of flags for designating languages rather than countries/regions.)
Sorry, if my modest suggestion came across harshly which was not my intention.
Cheers,
Georg
reply »
codestyling
12.12.2008 | 11:25I know the issue of forcing locale specific languages, especially it generates headache to users rely on plugins like Gengo or qTranlate which are using 2 letter language code specifiers instead.
Changing the behavoir from locale to lang code would also deny the WordPress 2.7 autoupdate process, where you no can choose the normal en_US or your locale version of WP. This depends on locales by design.
Nevertheless i worte a blog article (german at the moment, english translation comming soon) that i will setup a new roadmap for version 2.0 in january. I will maintain the already 1.x trunk but i will restucture the plugin internally to be more modular and better to maintain. During this process the 2.x trunk will also be able to deal with user given specifiers (locale or language codes) and should also able to deal with the japan special needs like ja_JA.UTF-8.po or ja_SJIS.po
The release of first 2.x version is planned latest march 2009.
(The flags has been introduced because of locale usage. The country is part of each locale specifier so the flags can be used. Indeed, if this will be extended in future, i have to thinks about, if it has to be handled in an other way.)
reply »
Georg
12.12.2008 | 19:45The way it is now I have to rename the .po and .mo files’ names via ftp every time I want to alter the wording. That’s OK as long as it concerns only my own WP installation, but I do hope i don’t have to wait until march for this rather simple annoyance to be fixed. Thanks for listening, anyway!
reply »
Eivind Ødegård
12.12.2008 | 12:58I don’t know if you like bugs or suggestions here, but here goes:
- There are some less precise language codes. I can only speak for Norwegian, where the correct codes are nb_NO for Norwegian bokmål and nn_NO for Norwegian nynorsk. It would be nice if you could fix this.
- The editor is good for small projects, but rather cumbersome for things like eg. Wordpress itself. Quick navigation possibilities, preferably with shortcuts to navigate through strings, would be perfect - in short, more of Poedit’s capabilities, please
- Once I have finished translating your plugin, would you like to have the translation for inclusion in future versions? Do tell me.
Otherwise, thanks for an already useful and potentially essential plugin.
reply »
codestyling
12.12.2008 | 13:08Yes i like always bug reports, how else this plugin could be improved
I will check your hints about Norwegian asap and will adjust it appropriated at next update. I would also be interested in getting your translation(s) and i would include them during this update too. If you want, please send me also the name and link to be used at Acknowledgement therefor (email can be found at imprint ).
As stated at my answer above i want to do the next milestone at redesign internally. Doing so i will also improve the capabilities of editor. The current code is a maintained version of my first try to deal with translations pure at PHP, the next one major version will be more sophisticated inside and outside
reply »
Kalle Kniivilä
15.12.2008 | 11:29Very useful plugin, thank you!
However, as my web site is partially in Esperanto, i miss the Esperanto language code. Could you please add it? eo_EO, there is a flag available, too. You can find both in this plugin, for example:
http://www.zen-dreams.com/en/zdmultilang/
reply »
codestyling
15.12.2008 | 11:45Thanks for your suggestion. I will include this during the next maintained release.
If you need a pre-patch soon, please let me know, i can send you an updated file.
reply »
Kalle Kniivilä
15.12.2008 | 21:09Yes, I’d very much like to have the updated file when you have one!
Thank you for the immediate response.
reply »
lbebo
17.12.2008 | 09:18Thanks for your great plugin which is really useful to translate the mo/po file.
reply »
Knut Sparhell
23.12.2008 | 09:13Great, great plugin!
I’ve got a problem: After moving blogs from Windows Server 2003 Web Edition to Windows Web Server 2008 I get nothing in the “Languages” column. The only thing I have got in this column is when a plugin has amigous language folders, asking me to select a proper folder. Otherwise completely empty.
Codestyling Localization: 1.70
WordPress: 2.7
PHP: 5.2.8
MySQL: 5.1
WP locale: nb_NO
Browsers tested: Firefox 3.0 and IE7.
Before: IIS 6.0 with FastCGI
Now: IIS 7.0 with FastCGI
Same plugins as before. Nothing else changed.
How may I now use this plugin? What I do is having the same setup at the old server, edit and then copy the .mo file to the new server.
Small bug found: codestyling-localization.php line 100: Warning: Undefined constant csp_po_install_plugin (fixed by adding proper quotes around the function name as argumet to function-exists). But this has nothing to do with my problem.
reply »
codestyling
23.12.2008 | 12:09I’m astonished, that it won’t work at your new environment. I have tested it carefully with WP 2.7, so this may not the case of fault. Because you have stated that you’ve copied the files, did you copy them from NTFS to NTFS now not having the proper rights (user) been set ?
May be this is an issue of accessing the files by owner/rights issue. Something similar may occur at safemode systems running on linux. Nevertheless I will have a look at the column code to review potential coding issues contained.
The warned constant name (missing function call quoting) will be soon updated.
reply »
Knut Sparhell
27.12.2008 | 08:08Thanks for the quick reply and for the suggestions.
My wp-content folder, wich contains all themes, plugins and languages, are writeable (NTFS Modify allowed, nothing disallowed). All individual .mo and .po files checked to have these inherited attributes.
WP 2.7-files was not copied, but downloaded, and then ACL “allow modify” was set for wp-content folder. Database was backup’ed at the source and restored on the new server. Some plugins copied, the rest downloaded or updated from the WP repository. And when copying NTFS files from one drive (or server) to aother, they all lose their ACL attributes and inherit new ones from their (new) parent folders. The “owner” is “Administrators”, but no owner rights attributes are set, so this has no rights implications (as in most cases on NTFS). I have also tested actual user rights for the impersonated anonymous web user and the identity of the worker process pool (user “Network Service”). So I can’t see this as the source for this strange behaviour.
PHP “safe mode” is not activated. File upload works fine. PHP build is “no thread safe” as recommended for IIS FastCGI.
I generally have run a lot of fine PHP applications under IIS on my Windows Servers for many years and they perform very good with the new FastCGI concept, also used (installed) on Windows 2003 Server (IIS6).
If this plugin for some reason decides not to display anything in the Languages column, please make it indicate why not, instead of just making a blank table cell, as it seems to do now. I may have missed some requirement in the setup.
I’m very grateful for any help and that you will be looking into the code in search for this.
reply »
codestyling
27.12.2008 | 11:46I’m still at investigation after received your screenshot. I was suprised, that the column completely disappearing, because there is no code included to hide it! This could be a problem of stylesheets (classnames) used by on other plugin hides it now, but i’m not sure at the moment. This missing column indicates normally, if something went wrong (like not writable files or missing language folder).
This is a strange view, i will try now to reproduce it locally, further information will follow asap.
additional note: I found the issue, it’s related to short_open_tag=”Off” setting at php.ini. I missed at 3 places the correct PHP tagging, so this column was skipped at if case. This has been repaired with version 1.71 and should now work as expected.
reply »
Knut Sparhell
27.12.2008 | 12:53It now works as expected. Thank you!
reply »
Kalle Kniivilä
01.01.2009 | 20:53I have installed your 1.71 version, but for some reason it doesn’t find the Esperanto language file for WP 2.8 which I want to edit. Is this because it doesn’t recognize eo_eo as a language code?
reply »
codestyling
03.01.2009 | 00:51The language eo_eo won’t be supported because it’s correctly written as “eo_EO”. This one is already been supported. Currently all translationfiles must meet “xx_ZZ” naming, this limitation will be removed in future version.
reply »
Kalle Kniivilä
01.01.2009 | 20:55By the way, I like your comment styling. Is this your own theme? How should I modify the comments.php file to get these nice boxes around comments?
reply »
codestyling
03.01.2009 | 00:52This is a self made plugin for WP 2.6 only and has strong connections to this modified theme, so i can’t be used stand alone with other themes, sorry.
reply »
Kalle Kniivilä
01.01.2009 | 22:05I can see that eo_eo is recognized. So the problem probably relates to the location of the language files for WP. There is nothing visible after “Textdomain:” for WP in the plugin main page. Why’s that?
reply »
codestyling
03.01.2009 | 00:57This is normal for WordPress itself, the textdomain is an empty string for the core. The problem is you have is simple related to the language file naming convertion xx_ZZ.mo.
reply »
CHS
03.01.2009 | 00:22Fantastic work! I mean, really, I wish we had more plugins that were so polished and rich in features as yours.
Thank you very much !
reply »
codestyling
03.01.2009 | 01:30I’m happy, if you enjoy working with this plugin. Currently i writing the next big version of (2.0 trunk) that will be (sorry for this) only work at WP 2.7 or higher. If you want a sneak peak please look at this article and the images at the end WordPress Localization - Features and future Development
reply »
Sourena
14.01.2009 | 07:41When I try to add “Persian” (fa_IR) as a new language in “Add a New Language” it is not on the list. How can I add it?
reply »
codestyling
15.01.2009 | 18:43You can add it at includes/locale-definitions.php.
Attention This file is UTF-8 encoded, please only change it having an editor supporting this!
It requires an entry at $csp_l10n_langs where the short term lang is mapped to correct locale term.
The 2nd modification will be needed at $csp_l10n_login_label, where you should add the correct written term “language” in your native language.
The $csp_l10n_plurals contains the mapping of short term language to the pluralization formula needed for you language. If unclear, please the englisch language as copy.
And last one you will need to add a new description array to $csp_l10n_sys_locales to define you language for the system.
Than it should be possible to use it. (the next major release won’t need such a config any longer).
reply »
Wesley
17.01.2009 | 17:47I tried to localize a theme page and it was great. So, i switched to the theme i preferred using the Appearance > Theme via WordPress 2.7 admin panel. Then i go to start localize the theme. But the theme set remains unchanged. It still linked to the old theme set i previously test-drive on. I tried deactivated the plug-in, delete its directory in the plug-in directory and upload a fresh copy. But it still the old theme i test-drive localisation. Any advice ?
reply »
codestyling
18.01.2009 | 20:43It sounds like your prefered theme doesn’t support localization and loading a translation file. All themes listed at the theme section support translation wether they are active or not. Missing your theme there implies, that i has no translation support.
Please ask the author for translation support of this theme.
reply »
Sourena
19.01.2009 | 06:33Please add Persian (language of Iran) as a language that can be added in the admin. The code is fa_IR. You have the flag and everything else there and the .po files can be edited if they exist, but one cannot generate a fa_IR.po from scratch.
If you are not sure about the plural forms I have to say it is like Turkish:
nplurals=1; plural=0;
reply »
codestyling
19.01.2009 | 11:27Ok, i will add this during next days and attach also a russian translation file. If you have a persian translation of this plugin just available, would you provide it too for uploading and publishing at next update ?
reply »
Sourena
20.01.2009 | 05:26That is great! Thanks.
I am not sure I can translate it soon. I am in the middle of a project. But I do that as soon as I can. I will send you the translated .po file as soon as it is done. I appreciate your work. This is a really great plugin.
reply »
Sourena
20.01.2009 | 07:39By the way, I have a question: Is there any way that “Codestyling Localization” saves the translated text from one theme or one software and apply it to a new one?
The best way would be suggesting it in a list, so if the translator approves the automated translation it can be applied to the .po file.
reply »
codestyling
20.01.2009 | 11:50Such features are planned for the next, more sophisticated 2.0 version trunk. This may include SVN synchronization and much more. The idea is ok and seems to be worth to be placed at my global todo list.
reply »
Álvaro Degives-Más
24.01.2009 | 17:51Hello Heiko, I’m awed by your fantastic plugin. In fact, I’ve just scrapped poEdit and have started using it right now to finish localization of a plugin. Now, I just ran into a funny typo in the Spanish language file for your plugin (well-translated by the way, compliments to the translator/localizer!) so I’ve correct that and included that in the twin set that you can download here(edit by codestyling: already downloaded and published at 1.72). (I filed that under “funny” because it translated “State” with “Country” while it actually referred to whether a given plugin was active or not… With apologies to the translator - it’s just one of those things…)
Thanks again!
reply »
codestyling
24.01.2009 | 23:53Thanks for your support, i have made a small update today (including your translation fix, an updated russian translation and also the ablility to create now farsi based translations from the scratch.
(You should also read the announcement i have written at wordpress.org plugin page that references an other article at my blog).
reply »
Josef Klimosz
06.02.2009 | 13:16Most useful plugin which I can see. Congratulation! Please give me address for sending you the Czech translation. Josef
reply »
codestyling
06.02.2009 | 13:59You can send the translation to my email account shown at my Imprint Page. Thanks for you feedback, makes my happy to do more with this plugin and provide addtional features soon.
reply »
Josef Klimosz
07.02.2009 | 11:20OK, was sent there yesterday. A little bug in plugin:
The sentence “matches any kind of whitespace like \f, \\n, \t, \v and space char.|pcre” cannot be translated (translation is not saved) - backslashs problem?
reply »
codestyling
07.02.2009 | 17:54Yes, seems to be a translation issue by backslashes (escapements are difficult, because sometimes js and PHP needs them), i will check this, thanks for reporting.
reply »
Josef Klimosz
07.02.2009 | 12:58Let me small ideas for next releases:
- pagination on the bottom of the list page, too
- options to zip and send lang pack (po+mo) to plugin’s author (if address is possible)
reply »
codestyling
07.02.2009 | 17:58Pagination at the bottom should be an easy thing, but zip and send should be defined.
Did you want to use your current users e-mail address to build the from ?
Do you thinks about a dialog with textarea where you can type in the mail text ?
Should you be able to change/modify the to address taken from plugin/theme itself ?
reply »
Samuel
10.02.2009 | 16:13Hi!
I was searching an online tool to make .po translations and I just find this plugin that is very promising (because most of my translations are about wordpress plugins).
But I wonder if you have thought (or you’ll be willing) about making a “portable” version of this tool, I mean a standalone version that can be used as generic PHP .po translation tool (something like an online version of PoEdit).
Best regards,
Samuel.
reply »
codestyling
10.02.2009 | 22:48A portable version would be interesting, also for other Open Source Projects. But using current code base of 1.x version would not be recommended. Because i’m currently writing the 2.x version trunc with new OOP based redesign, this would be the better source base doing this portable step.
I will put this to my idea’s list but this may take at least until Q3 this year to start initial phase and requires also a bit more spare time as i have current.
reply »
Samuel
11.02.2009 | 10:36Nice to know that you see it as suitable idea. No matter if it need to wait for some time, I’m sure you’ll do a good job when having the time
In the mean time, and after playing with your great plugin, I want to give you some suggestions for the next version:
- Support for Role manager, allowing to control wich users can access to the translation feature.
- Adding permission management for the translations, to allow to set individually wich user or users can edit a certain translation.
This way anyone could ask for help to their users to translate something, and the admin could set translation teams for each plugin to translate.
reply »
codestyling
11.02.2009 | 11:18Currently i have limit the ability to admin role only, because there are a lot of things to specifiy and to check, if i would allow a per user / role editing. I think, WordPress itself needs slightly different rule set than themes and plugins, because this may have impacts to proper function of admin interface.
Themes are presented to visitors, so it’s also an other kind of rights management needed.
But nevertheless, this is already at my todo list but has currently the lowest priority at redesign. After new version will be published, i think, i will deal with the user / role management more specific until first service release.
reply »
Michel
13.02.2009 | 15:22Congratulation for your enormous awesome plugin…
Just a detail :
to see .po or .mo in the list, the file names must n’t be capitalized ??? - but it is possible to translate file existing .po with capitalized chars in name…. (add possible but with incorrect name)…
give me an email to send you snapshot.
Best regards…
Michel
Work on bsd unix (osx)
reply »
Álvaro Degives-Más
17.02.2009 | 01:56Hi Heiko - I saw you’ve changed a few strings, so I’ve updated the .po and .mo files for Spanish again - feel free to fetch the new version here. Please feel free to contact me once other changes are made / necessary!
The more I use your plugin, the more I’m loving it… Thanks again.
reply »
Mizuno
24.02.2009 | 09:53Hello, Heiko.
Thank you for providing a very exciting plugin.
I’m Fumito Mizuno, living in Kobe, Japan.
I made a ja_JP.po for your plugin.
http://www.ounziw.com/wp-content/uploads/2009/02/codestyling-localization-ja_JP.po
I don’t know how to escape “\” in .po file, so I translated “\” to “backslash.” For example, “\B” is tranlated to “backslash B.”
reply »
codestyling
24.02.2009 | 15:33Did you have this problem at this plugin translation or more general ?
I could be possible, that you may need special keyboard assistance, i missed to implement. If so, could you please provide some additional information, where i can read something about japanese keyboard layouts and handling of ? I would implement it but i don’t know, what has to be done.
reply »
Mizuno
13.03.2009 | 11:0724.02.2009 | 09:53
Hello, Heiko.
>> “\B” is tranlated to “backslash B.”
It is due to my local setting.
The problem is, the backslash-key and the yen-key (symbol for Japanese currency) are the same key assignment in Japanese.
If I copy “\” and paste it, it works well.
reply »
Dr. Georg S. Adamsen
26.02.2009 | 21:28Hi, Heiko!
I found a little problem today, which might have something to do with the Codestyling Localization plugin. It seems as though I have created or perhaps modified some of the language files with C.L. These files are, if I am right, saved through Apache. If I try to update them or delete them for whatever reason by FTP, I do not have the necessary permissions.
Is there any way that C.L. could save files etc. with me as owner? Would that be a feature suggestion?
reply »
codestyling
26.02.2009 | 21:55Yes, indeed this is a problem. Because the files been generated with the user connected to the running script, this may be in case of safe_mode provider settings the user wwwrun and the FTP user may not be able to delete it.
I currently try to find an appropriated way to do this (also WP auto-update has the same problems with several provider). But this may also require a way using FTP load/save for updates and may also slowdown the scan process.
Definitely i will cope with this in near future but for now only following work arround may solve it:
1.) download the “undeletable” files by FTP to your local machine.
2.) delete them using the delete button of C.L. (same user as created)
3.) upload them by FTP (should now get your FTP user as owner).
reply »
Álvaro Degives-Más
01.03.2009 | 11:20Aside from Heiko’s perfectly valid workaround there’s another, completely different approach that you could use for localization of WordPress files: instead of localizing against a “live” server, you can set up a staging server on your computer, and replicate your installation there. If you’re running MacOS, Linux or Solaris you could use the very lightweight XAMPP for that; if you’re running a Windows machine, you can use the featherweight Uniform Server (a complete AMPP - Apache, mySQL5, PHP5 and Perl - in under 32MB!) so that:
1) You won’t have the permissions problem
2) If something goes terribly wrong it doesn’t affect your server (in fact, worse case scenario for UniServer is to just delete the folder with the entire install - no fuss no muss!)
3) The speed at which you’re working, i.e. at which your translation shows up in your locally served “website” is such that I frankly recommend everyone to go that route - it’s lightning fast.
4) This method puts Codestyling Localization to work in a highly effective and efficient way: you’re working with CL against a real-time WordPress install, so you can instantly see the effect of what you’re doing against an exact replica of your real site, and you’re working at the maximum speed of your CPU and hard drive, compared to bandwidth restrictions you may have while working over the Net.
Once you’re satisfied, upload the .po/.mo files to your real (production) server and… Presto! Translation(s) up and running - but without the debugging phase, and no permission issues at all. Just a tip…
reply »
Álvaro Degives-Más
01.03.2009 | 15:07Here’s a suggestion for v2: include a CapitalizationPottyTrainer function! One of the old (but very sore) complaints of localizers is the issue of dates: names of months, weekdays, etc. which aren’t capitalized in many languages - yet because of the English original, propagate into an awful lot of translations, leading to something visually as annoying as the proverbial nail on the blackboard.
Now there are several ways of dealing with changing the case of strings (or string elements) in PHP, but I’d love to see some kind of shortcode or tag wrapper that one can use within a translated string, so as to indicate how the wrapped element (word) needs to be capitalized, if different from the canonical (i.e. US English) version. This proposed / theoretical solution provides the necessary flexibility to deal with places where such (normally) lowercase words have to be capitalized; think e.g. about the archive list of months, which look weird in lowercase. I’m not a PHP coder, but in my estimation this would imply an additional plugin of sorts that has to be loaded into WP, so as to handle (parse) the wrapped terms. What I’m much less sure about is how to do that, because parsing wrapped words on each page load seems like an atrocity, and yet I can’t figure out another, more efficient way to do that “case management” where necessary.
Or, perhaps, some way to highlight the plugin code affected by a wrapper, so that changes can be made in that code; a bit in the way that localized currency, date and plurals in strings are handled, with a separate string for different scenarios. I wish someone at Automattic would pay attention to this issue… In principle this shouldn’t be too difficult to tackle, as long as a systematic approach is picked… And it would undoubtedly help a lot in opening up the tremendous vault of available themes also into other languages, because there’s a certain tendency to stick only to those available when mercilessly hacked for translation (or directly developed for a certain language)
Um… Sorry for being so verbose here! Just trying to explain the more broad notion / need behind this suggestion.
reply »
codestyling
01.03.2009 | 16:00Hmm, this is a problem, if there are specific words inside a sentence to be capitalized. But it could be achieved by using CSS and span Elements inside:
<span class=”capitalize”>some words to capitalize</span>
with a CSS style:
.capitalize {text-transform:capitalize
}
The text-transform rule works on every major browser and it supports:
Using this in that way the theme designer can easily define it for the look an feel.
The only other way with high performance would be a dictionary to be used to identify such words during translation and autocorrect them. (Something like Open Office Dictionary can be attached to Firefox).
reply »
Álvaro Degives-Más
02.03.2009 | 11:05Yes, I’ve thought about CSS - which has the added advantage that it’s a client-side solution, so it hardly burdens the server. And I suppose in practice that’s good enough; wrapping the bits in span tags for lowercase conversion can deliver the same result (it’s typically converstion to lowercase). In that case, wrapping with the lowercase styling class would be great. Anyway, I digress: here’s the updated Spanish translation for Codestyling Localization v1.80.
reply »
Annifey
10.03.2009 | 20:33AMAZING plugin!!
However I have a small problem.
None of the images in the plugin shows…
The paths seems correct but no images show.
Anyone who knows what to do?
reply »
codestyling
10.03.2009 | 22:12Could you please specify the used Browser ? I tried to access one of your images and i got it. I have no explanation therefor at the moment.
reply »
Anmari
11.03.2009 | 02:44Fantastic Plugin - all we need now is for some way to leverage everyone’s translation efforts and share previously translated files - do a “scan” for matched translations first and/or provide a way to load up dictionaries.
say initially use what ever files are in the current instance, also allow a dictionary area, locally or externally.
By the way where is your donate link!!?
reply »
codestyling
11.03.2009 | 11:04Thanks you for your great feeedback. Unfortunately i haven’t yet a donation link, it’s planned soon but currently not available.
reply »
kish
26.04.2009 | 22:42Hello codestyling. I have just started to use your plugin and I have noticed that it works ok with the plugins I have installed; all but one. Plugin “invite-friends” does not respond to localization. po & mo files are created but the english messages are still there. I am spanish.
I hope you can help me as I have tried to look for a similar plugin but I haven’t found it. Of course, I could “hard-code” the translation but I want to be able to update the plugin when it is available.
Tell me if you need further info.
Thanks in advanced and congratulations for this amazing plugin (a poedit alternative, at last!).
-kish-
reply »
codestyling
27.04.2009 | 11:27I will check this plugin and investigate the issues inside. Is this plugin hosted by WP plugin directory or did you download it from a different source ?
Could you confirm the download location so that i can proceed with testing ?
reply »
kish
28.04.2009 | 01:56I downloaded it from here.
Hope it helps.
-kish-
reply »
codestyling
28.04.2009 | 09:00Ok, thanks. I will check it and give you the appropriated advice afterwards.
reply »
kish
28.04.2009 | 17:44I will appreciate if you send me an email when you have got further info. Anyway, I will have a look to the comments from time to time.
Thanks in advanced.
-kish-
reply »
kish
27.04.2009 | 01:43[FIXED]
Plugin had this line of code:
load_plugin_textdomain(’invite-friends’, WP_CONTENT_DIR.’/plugins/invite-friends’);
Replaced with:
load_plugin_textdomain(’invite-friends’, PLUGINDIR.’/’.dirname(plugin_basename(__FILE__)), dirname(plugin_basename(__FILE__)));
I am not sure what is the difference but, after comparing with a working plugin, I tried to change this line structure. I suppose that this issue is a bug of the “invite-friends” plugin, not yours. I will try to contact developer.
Thanks anyway.
reply »
Venca
01.05.2009 | 11:22Nice! It should be.
reply »
Sergey
01.05.2009 | 13:17Thank you for the great Plug-In!!! It saves a lot of time!!!
reply »
Samuel
02.05.2009 | 00:27Is the plugin development stopped?
I ask because in the WP plugin repository says that the new 2.x version is “planned for end of February” but we are at May and no news
reply »
codestyling
05.05.2009 | 17:51No, the development isn’t stopped but delayed because of personal time management issues
And the 2nd point of delay is caused by WordPress itself, with 2.8 some changes will be introduced regarding the internal language file mangement and handling. I have to check and test it carefully to avoid problems by using the plugin.
I hope to continue end of may and finish it mid of june.
reply »
Jai
08.05.2009 | 19:16Hi, this is a brilliant plugin, I have been able to use it nearly perfectly except for one problem. How can I get my links that are not generated by Wordpress to be translated and have the ‘?lang=’ querystring appended to it?
For example, I placed a link in my header using the normal html markup,
, but whenever the page is translated the link stays the same. I have seen your functions that have been hooked into Wordpress’ permalink structure but I am unable to make any modification for this to work because of my tight deadline.What do you rekon I do?
Thanks once again for a wonderful plugin, your brilliant.
reply »
codestyling
08.05.2009 | 22:36I use a modified plugin from this french author http://www.jide.fr/ named yammyamm. Each post is unique and has it’s own id and also normal rewrite rule. The plugin uses 2 main categories to separate between german and english and keeps trac of all necessary places. That’s why i can not directly flip between eng/ger version of the same article but i can deactivate the plugin and have a safe and clean database, only the articles are displayed mixed but content still remains unmodified.
reply »
Jai
09.05.2009 | 00:13Thanks for the reply. I found a work around for my problem, now everything works superbly.
Great plugin.
reply »
kish
10.05.2009 | 20:27I am really amazed with this product and I am wondering if there is something similar for Joomla.
reply »
Sourena
12.05.2009 | 01:15I have translated the plugin into Persian. Please let me know how I can send it to you.
reply »
Sourena
12.05.2009 | 01:24You can download the Persian translation from here:
http://sourena.net/codestyling-Persian.zip
reply »
Sourena
15.05.2009 | 17:41Did you download it?
reply »
codestyling
15.05.2009 | 17:45Yes i did, but it was empty.
reply »
Sourena
19.05.2009 | 01:59I am sorry. I think I forgot to place the files there. I uploaded the new ZIP file. Please download it again.
reply »
noname
23.05.2009 | 22:54it does not work with the latest beta - when i do actualisation of wordpress language file (or try to create a new langugage), it says Access Error on some file somewhere in the middle (probably starting with class … i cannot catch it so fast, the problem is it does not says where the Access Error is) .
reply »
noname
23.05.2009 | 23:00and p.s.: it (edit, scan … anything what use that ajax “window”) still does not work with Google Chrome
reply »
codestyling
23.05.2009 | 23:10I have tested it with 2.8-beta1-11436 and Firefox. i can’t find a problem (except that scanning WordPress itself doesn’t find all new language specific, non standard gettext marker). This will be updated as soon as final 2.8 is available. For Google Chrome, it is still not working because of some issues inside Chromes JS engine. This has also be stated at the compatible Browser list at the beginning of this article.
reply »
noname
24.05.2009 | 15:14i have tested it with beta2 and firefox and ie
reply »
Karl
29.05.2009 | 13:34Hello,
Just tried this plugin out, as a way to allow a client to add more theme translations - seems to work great so far! Many thanks for building and releasing it, much appreciated.
I have a query though: when adding a new language for my theme, it ends up in the root of that theme folder, although all previous languages (two by default) are stored in a /languages folder. Is there any way to define where the new translations should be kept? I find it’s a lot neater when theme .php files are kept in the root and any other additional files are stored in their own folders (languages, css, images).
Many thanks!
reply »
codestyling
29.05.2009 | 13:45Support at Themes with subfolders will be subject of the rewritten v2 of this plugin. Unfortunately not all supported versions of WordPress allow by using load_theme_textdomain to specify a dedicated path. WP 2.5 as example only loads theme translations from main folder. That’s why all theme related translations will be created at the main folder.
reply »
Karl
02.06.2009 | 10:43Thanks for the reply!
OK, then I’ll put all language files in the main theme folder for now and when you have time for v2, I’ll have a look and see if you’ve managed to get the option to define path included.
Keep up the good work!
reply »
Turkdale
05.06.2009 | 12:45Nice Plugin.
I have Translate the plugin to dutch but i have 1 problem.
When i use “translate with Google Api”, he translates to english.
I want to translate with that link to dutch.
Can you help me?
reply »
codestyling
05.06.2009 | 15:54I have tested a small plugin with translation and created a nl_NL language file for. I scanned the plugin and afterwards tested the Google API translation on this.
For example for source field “save changes” i got the translation “Wijzigingen opslaan“. I’m not sure if this is correct NL but the requests are made properly. It seams that Google translate for NL is not well trained, so many of phrase return in source language.
I can’t find an issue inside the plugin.
Many tanks for the provided nl_NL translation file, if will as soon as possible update this at repository. (I hope, it’s ok that i’ve removed your 2nd comment containing the download only.)
reply »
bernd
15.06.2009 | 15:49Please help urgently:
I Installed the codestyling localization plugin into my wordpress (2.8, german version) and everything worked perfectly. I was able to edit po files and rescan plugin files without problems.
Then I started to recsan wordpress itself. After a few seconds the scan hung up while scanning options.misc.php. Since that very moment I obtain an error message when trying to view my blog behe.net in any browser:
“Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/vhosts/behe.net/httpdocs/wordpress/wp-includes/pomo/mo.php on line 81″
I am desperate, How can I repair this?
reply »
codestyling
15.06.2009 | 15:57Hi Bernd, the plugin has currently not been updated to meet WP 2.8 in terms of re-scanning WordPress itself!
It work as intended with Plugin and Themes but not with WordPress 2.8 core files!
I’m still on investigation and preparing a quick fix with 48 hour from now and will publish also new blog entry while it is availbale at WordPress Plugin Repository.
Sorry for that, i had to do a lot of repair work across “WordPress Deutschland”, some of my friend and emergency request because of lost data. That’s why this has been delayed currently.
Update: I have send you an additional e-mail regarding to your problem. If your mail address is invalid, please let me know, you i can give you more instructions.
reply »
r-sn.com
19.06.2009 | 17:17Thank you
great plugin
this translation of arabic language :
http://www.r-sn.com/codestyling-localization_arabic.zip
please add it in next version ..
reply »
r-sn.com
19.06.2009 | 17:24What is meaning of pcre ?
reply »
codestyling
19.06.2009 | 18:05Thank you for providing this translation, i will update soon the repository version, so i will package it into.
Regarding your question about pcre this meens PCRE - Perl Compatible Regular Expressions and i put the link here.
reply »
Stokstaartje
06.07.2009 | 15:26Hi there,
Using the updated plugin to translate the Twitter Widget Pro plugin. Doing so, I can generate two translation files: twitter-widget-pro-nl_NL.mo and nl_NL.mo. Changes in the first show up, changes in the nl_NL.mo do not show up. When I go back to re-edit, I get the following message:
“Your translation file doesn’t support the required textdomain extension.
Please re-scan the related source files to enable this feature.”
When I do a re-scan, the nl_NL.mo is swiped clean again and all translations are gone. This nl_NL.mo file only contains plurals.
What am I doing wrong here?
reply »
codestyling
06.07.2009 | 16:09First of all thanks for your reply. The Plugin uses the default textdomain accidentally an missed the ability to provide the plugin based textdomain, here the definition of WP sources:
The file contains all the plurals in wrong notation:
Normally all this occurances should be written as:
I don’t know, how you re-scanned the “nl_NL.mo”. The default textdomain should not be exported, it’s just possible for splitting several textdomains contained.
What you need is:
1.) the correct usage of _n(…) inside the plugin, please inform the author about this mistake too.
2.) the plugin needed file is: ‘twitter-widget-pro-nl_NL.po’ and the resulting *.mo.
I will publish a new article about serveral mistakes plugin writers are currently doing inside their plugins.
What you have found would result in past that this parts of texts never gets translated during runtime because they will be searched at the wrong textdomain.
reply »
Stokstaartje
06.07.2009 | 16:36Thank you for your quick reply. I’ll contact the author of the plugin.
reply »
Kvark
07.07.2009 | 01:12check if you have rights to write to thise files, but i have the same error, so think its saomthing wrong with new version, becouse on 1.80 all was fine 5minutes ago…
reply »
Kvark
07.07.2009 | 01:09Greetings! I start translating yours plugin on 1.80 version, today deside to update, now have error:
reply »
Kvark
07.07.2009 | 01:09Your translation file doesn’t support the required textdomain extension.
Please re-scan the related source files to enable this feature.
reply »
codestyling
07.07.2009 | 01:15This is normal on not re-scanned po files. If you re-scan your language you are about to translate, you should be able to translate it.
The new separation feature of multiple contained textdomains extends the po file at each entry with the mapped textdomain. As long as it is not scanned new by this plugin, you will get this message.
I will update my documentation next days, currently i run out of time for this.
I thought, it’s enough to direct with the text to re-scan but i’m afraid, this is not enough.
reply »
Kvark
07.07.2009 | 01:18ok, thanks, it’s helps
reply »
Kvark
07.07.2009 | 01:25also then you have time, will be nice to add 2 more buttons, preview and neхt becouse some time i need to go back few time back to see how i am translate but dont want to “save and prew” becouse it take to much time, just clik next or prev to check translation all that i need
good luck yours plugin realy smart and nice!
reply »
codestyling
07.07.2009 | 02:06I put it on my long todo list for version 2.0 comming with a more intuitive UI than current.
Also planned comparison between more than one source language for those are able to understand more than 1 foreign language and want to look at other translations at the same time.
In long terms also something like a translation dictionary is in my mind, local snapshots and also server based huge database for lookups (on demand and user’s wish). But this will take more time as currently available.
reply »
Stokstaartje
07.07.2009 | 12:30I contacted the author of the plugin and he released a new version. Now the translations show up in the right file. I provided the plural translations, generated the .mo file and still the translations do not show up.
And besides that, if I want to re-edit the translation files the now familiar message pops-up again:
Your translation file doesn’t support the required textdomain extension.
Please re-scan the related source files to enable this feature.
Sorry to bother you, but I am not knowledgable enough to be able to tell whether this is an issue with the localization plugin or the other (twitter) plugin.
reply »
Kvark
07.07.2009 | 23:07emmm did you push button: generate *.mo file?
reply »
Stokstaartje
07.07.2009 | 12:44small addition: after the rescan my previous translations are gone…
reply »
codestyling
07.07.2009 | 12:57It’s no problem, just ask if questions remain.
I did download the latest version too and checked it. I did tests with the contained “es_ES” and also created a “nl_NL version and re-scanned it multiple times.
I couldn’t find an error for now. Could you please send me by mail (see imprint for address) your translations (*.po and also the first time generated *.mo) to validated it ?
Normally translation won’t be gone automatical, this behavoir is not known and need not to be related to the plugin.
I will inform you after testing your file, what i found or what could be the reason therefor.
reply »
Kvark
07.07.2009 | 23:10repeat again, check you rigt to write files, i lost 2 hours of work for that
“chmod 777 *” will help, dont foget “chmod 755 *” after finish
for autor: will be nice include in todo list to some warning like “it cant be saved” and roll back without lost of maded translation?
reply »
Kvark
07.07.2009 | 23:19Lithuanian translation almast done, but still not traslateble textdomain field inside (then click on edit language, its show in upper koner, outside it show translated - bug?) also not translatable “about”, isit posible to incliude that field in language file also so i can translate discribtion for plugin also?
reply »
codestyling
07.07.2009 | 23:23The issue seems to be related quite different. I’m currently at analysis. It seems to be related to an source file (php) that is coded in Ansi (not us-ascii 7 and also not UTF-8). If i try shuch a file with german Ü inside not coded UTF-8, the scanner produces a header less *.po file.
I will try to find out, what went wrong in such a case.
BTW: all my files at my hosters machine have [rw-|r--|r--] and i can modify them as i want by the plugin.
In most cases this is related to safemode or provider restrictions. The future version will try to use the FTP access WP takes for updates, but this would also require something like a “temp” dir at wp-content then too.
reply »
Kvark
07.07.2009 | 23:24and is it posible to enlarge column on first view? (befo click edit) becouse some translation not fit
just for few characrters (textdomain:, Version:, State:, description:, ) “Pavadinimas:” looks like
Pavadinimas
:
reply »
melinda
18.07.2009 | 11:22how to do u actually activate the other langage to show on the blog?
reply »
codestyling
18.07.2009 | 16:46Normally you should have a localized version of WordPress in your language. If so, the blog will run in your choosen language and also the plugins/themes do that.
If you only run the original english version but want to have it in another lang, then 2 steps has to be done:
1.) download the required language files from wordpress.org and put them into /wp-content/languages.
2.) edit you wp-config.php and place the language const accordingly.
example for spain: define (’WPLANG’, ‘es_ES’);
If this answer doesn’t solve you question, please describe you issue more precisely.
reply »
melinda
18.07.2009 | 19:13@codestyling. thanks for this fast answer. but I swear i’m doing Just that! My blog is running in english but i want people to read the the blog to get the buttons in french. ur plugin recognize the language pack so i dont see why wordpress is not showing in french.
what i do i just what u told me to do:
1) i got my fr_FR.mo and fr_FR.po under wp-content/languages
2) i edit the wp-config.php to: define (’WPLANG’, ‘fr_FR’);
and still nothing…
what am i doing wrong? i’ve been googling about this for the past 3 days…
reply »
codestyling
18.07.2009 | 22:09I did send an email with some additional questions. Solving your problem is more suitable in mail conversation than here as comments.
reply »
ovidiu
24.07.2009 | 09:18Just got this message: ATTENTION: The path of translation files is ambiguous, please select the language file folder!
Now I am wondering how do I know which path to chose? I can browse all suggested paths, what do I look for to pick the right one?
reply »
codestyling
24.07.2009 | 10:57You will get this message and the folder list, if the plugin isn’t able to detect the correct path, where the language file has to be placed. Because this normally depends on what the author of plugin/theme prefers, it can’t be detected successful in all cases. That’s why the plugin asks you to make the choice.
There is no standard for placing language files, so there can only be done a few tests to eval the path, where it could be. The plugin tries to locate any existing *.mo, *.po or *.pot file inside the space of the dedicated plugin/theme and if it at least found one, it assumes, that this is the correct path. If there is none of them and it was also not able to detect the path at source level, this question will occur.
If you get this at WordPress itself, this mostly is driven by the fact, that the US version doesn’t contain the folder /wp-content/languages/ but for this case the plugin can create it if possible (sligthly different warning).
reply »
Ünsal Korkmaz
25.07.2009 | 17:55well.. i love this plugin but couldnt work on any wordpress mu plugin.. most of mu plugins, that i am using, are not in a directory.. for example: /wp-content/mu-plugins/plugin.php
but codestyle plugin searching in /wp-content/mu-plugins/./
reply »
codestyling
25.07.2009 | 21:53Thanks for reporting. I will check this, but normally this should work. I would think about 2 reasons:
a) the provider is such restrictive not to allow such path adressing
b) the plugin doesn’t support gettext feature.
The analysis will start as soon as possible, but I can only use my WP 2.8 normal version for tests because i have currently no mu installation for testing. This may lead to a potential new update at wordpress.org
reply »
Ünsal Korkmaz
27.07.2009 | 22:11ehm.. i cant create .po files for http://www.gdstarrating.com plugin..
can you check it if possible?
reply »
codestyling
28.07.2009 | 00:37I can create them in a normal WordPress 2.8.2 installation. I did also create an fresh (not yet existing language Türkçe). I did run rescan and also launched the editor and could proceed with tranlation but i’m unabled to translate into this language.
It seems to be a problem of the WMPU folder structure. Currently i have a short restricted amount of time, i will check it as soon as possible. I f you would place it in the meentime into the ordinary folder wp-content/plugins/gd-star-rating/ it would be detected, could be translated and afterwards moved into your prefered location.
Today i also read an article of this plugin author, that this plugin (GDStarRating) is not 100% WPMU / BuddyPress ready, please also read his page for any further problems too.
reply »
Ünsal Korkmaz
28.07.2009 | 10:47i install it on normal wordpress but when i try “rescan”.. plugin saying Please standby, files presently being scanned … but progress waiting on 0 always.
Affected Total Files: 149 /wp-content/plugins/gd-star-rating/
i try it in different language en_GB .. same issue
reply »
codestyling
28.07.2009 | 11:26Is this the only one Plugin, that is not translatable ?
Are there other plugins, that could be tranlated successful ?
Did your Server run in safemode ?
reply »
Ünsal Korkmaz
28.07.2009 | 11:52no no.. i can modify others.. and i am happy with it
just this one created a problem and i want to use it :S
reply »
codestyling
28.07.2009 | 12:19hmm, i only can think about user permissions at the install path. I have currently no other idea, why this happens, because if other plugins work, this plugin may be transfered to domain with possible wrong user right makes it impossible to scan.
But it’s shouldn’t hang, i have to investigate that.
reply »
Ünsal Korkmaz
28.07.2009 | 13:46i delete plugin files and manual installed it.. nothing changed
reply »
Ünsal Korkmaz
28.07.2009 | 20:47hahahaah.. i found problem…
http://wordpress.org/support/topic/294711
super cache plugin bug.. when i found bug.. i try codestyle and its working too ..rofl
reply »
codestyling
28.07.2009 | 20:54Thanks for sharing this info and happy, that you are on track again. I think, i should hint this at the plugin description to avoid for other user the same hard way to figure it out.
reply »
ovidiu
30.07.2009 | 10:28got a little problem on a wpmu isntallation:
I have 3 language files, the .mo part. this plugin shows white .po and green .mo so I go scan and I am told:
I went to the folder containing those files and set my permissions:
chown -R user:group web/
chmod -R 755 web/
these settigns allow me to automatically update wordpress and/or plugins install new themes etc. so I guess the checks performed by your plugin are too strict. (running suPhp)
reply »
codestyling
30.07.2009 | 10:51Normally a 666 in worst case rw-|rw-|rw- should be sufficient enough. Why the execute state should be set ? Furthermore, did the new po file get a red box after creation, if you would return from edit screen ?
If there is only a *.mo but no *.po and you launch edit, the *.po will be build out of the *.mo content and launches editor. May be the rights are not set properly in this case. Could you test this with this steps:
1.) having *.mo only
2.) press edit
3.) return to overview
If it’s now a red *.po, try clicking the read *.po symbol, this will change the rights to be sufficient (666 in worst case, normally 644). If this works, i have to change it during direct *.mo file convert.
BTW: the plugin gets as next the same filesystem based read/write access like the “WP Native Dashboard” but it will take until mid of next week because i’m on a short trip next days.
reply »
ovidiu
30.07.2009 | 13:24ok, I went to the localization menu, having only a .mo file, green.
1. clicked edit, got this error: Your translation file doesn’t support the required textdomain extension.
Please re-scan the related source files to enable this feature. The textdomain drop down doesn’t list anything in the dropdown.
2. went back to main page, .po still showing white, .mo green
I can wait till you incldue the settigns for the plugin to behave like the “WP Native Dashboard” …
thx for helping,
reply »
jarjav
30.07.2009 | 13:32I have got a little problem. Why I can not use Google Translate API for sk_SK.po files? (slovak language)
Google support it!
Thanks for excellent plugin!
reply »
codestyling
30.07.2009 | 13:45This depends on the plugins lookup table. There are all supported languages defined and their “Google Translate API support”. For sk_SK it’s currently off.
I have checked it and yes, it works. This will be updated soon. If you want to get it working now, following change has to be performed:
1.) locate the file /codestyling-localization/includes/locale-definitions.php
2.) open this at an editor. Attention: The editor has to open it in UTF-8 and also to save as UTF-8 without BOM marker !
3.) Search inside this:
and replace the value of ‘google-api’ from false to true.
After you made this change, it should utilize Google Translate API as expected.
Thanks for reporting.
reply »
jarjav
30.07.2009 | 15:01So easy
Thanks. One more question about slovak language.
I change plural definition for it in the file locale-definitions.php .
Like this:
When I want change plurals for term “Languages” there are your previous definition.
On page codestyling-localization.php are not correct terms after language summaries.
Regards
reply »
codestyling
30.07.2009 | 18:05Ok, i will correct the plural formula for sk as well with the next update.
I don’t anderstand, what you want to say with your last sentence. Could you explain it more specific ?
reply »
jarjav
30.07.2009 | 23:27I used your plurals formula (n==1) ? 1 : (n>=2 && n<=4) ? 2 : 0
and added this slovak words for plurals:
0,5,6 … - jazykov (index 0)
1 - jazyk (index 1)
2,3,4 - jazyky (index 2)
It seems that your formula is good, please do not make changes. Sorry for my mistake. Than where is problem? OK I describe it.
On main page codestyling-localization.php are on right side tables with available language files.
Each plugin or thema has got its own table.
At the top of each table on left side is link “Add new language” and on right side sum of languages.
I have follow sum of languages:
WordPress - 1 (index 1), CodeStyling Localization - 16 (index 0), Arras Theme 3 (index 2)
Logically localized terms should be 1 jazyk, 16 jazykov and 3 jazyky
but I have got 1 jazykov, 16 jazyk and 3 jazyk. Why 16 and 3 are the same when index
for this numbers is different?
Regards
reply »
codestyling
31.07.2009 | 00:23Ok, thanks for that detailed explanation. I have to investigate this behavoir. Could you please send me your current tested language files as zip (mail can be found at my imprint or inside the plugin file header) ?
Unfortunately i have to go to a 3 days travel and can check it earliest sunday evening. I hope this doesn’t stop your enthusiasm dealing with the plugin.
reply »