This forum is for questions about translating the Drupal user interface. See also the Translations group.

Bulgarian Translation / Български превод на Drupal

Официален превод на български и коментари

Possible proble with translation of month name

Hi all,
we're working on the Italian translation of Drupal, and we've encountered a problem with the translation of 'May' month.
The problem is that this string is used both for long format and medium format, so 'May' is 'May' in both cases.
With Italian (but I suspect also in other languages, long format for May is 'Maggio', while medium format is 'Mag' (which is the abbreviation of 'Maggio').
The problem is that only one string exists. How should we translate it ?? with long or medium format ??
thanks for any suggestion !

Matteo

Producing a new CVS release

Do I need to do anything to produce a new CVS release for the Portuguese language? The file is still the one created on the 12 of December, but since then I already uploaded many changes...

I thought it was an automated process, but it seems it's not... :(

Regards,

Miguel Duarte

Danish Translation

I have uploaded version 1.0 of my full Danish translation of Drupal 4.5.1:

http://drupal.org/node/14286

Comments and opinions are very welcome :-)

one-click language switch without a module (drp-4.5)

After a long time looking for one-click language switch (http://drupal.org/node/2693, http://drupal.org/node/2672, i18n.module) and not being satisfied with the solutions, i come up with my own. (I should say that i'm not a php expert and if you like, use the below codes at your own risk.)

here is an example that uses sessions:
i did this for my site that uses English and Turkish translations, and it works. (for translations you must activate locale.module and add languages you will use.)
you may change the language codes 'tr' and 'en' or add more for your needs.

firstly, we have to hack common.inc--> locale_initialize() function

function locale_initialize() {
  global $user;

  //Lines added - begin
  if ($_GET['mylang']=='tr' || $_GET['mylang']=='en') {// allow only tr and en tags. (change for your needs)
    return $_SESSION['mylang'] = $_GET['mylang'];
  }
  if ($_SESSION['mylang']) return $_SESSION['mylang'];
  //Lines added - end

  if (function_exists('i18n_get_lang')) {
  ...
  ...
  ...

now what we should do is to send the variable 'mylang' with values 'en' or 'tr' (or what else you defined in locale_initialize) by GET method.
And also we should conserve the page path. we will use the $_GET['q'] variable for this.

BLOCK choice:
go to block settings and add this block:

echo l('English', $_GET['q'].'&mylang=en'); // link to /path&mylang=en
echo '<br />';
echo l('Turkish', $_GET['q'].'&mylang=tr'); // link to /path&mylang=tr

THEME choice:(only tested with xtemplate engine)
In themes you should use {PHP._GET.q} instead of $_GET['q']
Add this code to anywhere in your template file (here i used images instead of text links):

<a href="/?q={PHP._GET.q}&mylang=tr"><img src="/files/pictures/flags/tr.png"></a>
<a href="/?q={PHP._GET.q}&mylang=en"><img src="/files/pictures/flags/en.png"></a>

here the problem is the part "?q=". since you can't use the link function as in the block choice, if you use clean urls you must delete "?q=" from href attribute.
I wonder if there is any alternative that is independent of clean url usage.???
I also wonder if there is any alternative for one-click language switch wihout hacking core???

After translating a Module, how to enable the translation?

I've recently translated recipe.module into Chinese(for the sake of great Chinese food (:). I got the recipe.pot file and zh.po file and put them togather into po subdirectory of the recipe directory under the modules directory. But the problem is that the translation does not work at all. In my site, the recipe.module is still English. I don't know what's wrong. Couly you give me some suggestion? Thanks a ton!

Pages

Subscribe with RSS Subscribe to RSS - Translations