Author Topic: [MOD] Multi-Language support for any text (updated 05-11-2005)  (Read 215676 times)

0 Members and 1 Guest are viewing this topic.

TheOracle

  • Guest
Re: [MOD] Multi-Language support for any text
« Reply #30 on: September 02, 2005, 12:01:58 AM »
Quote

What can I do that I can add texts in more languages to the picture when I upload it?


That would be in your lang/<your_lang>/main.php file.

Then, you need to register each strings you've added into your includes/page_header.php file. ;)

Offline Xyu BAM

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Re: [MOD] Multi-Language support for any text
« Reply #31 on: September 02, 2005, 12:57:57 AM »
What can I do that I can add texts in more languages to the picture when I upload it?

GER - PIC NAME
-----TEXT BOX------

ENG - PIC NAME
-----TEXT BOX------


Thanks
I guess just add more languages to the string (text)...


@martrix:
if I'm not misstaken, you also need add multilang to the code that handles keywords...dont know where exactly though, sorry.
Let me know if you find it, I need it too :)

Offline Alex01

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: [MOD] Multi-Language support for any text
« Reply #32 on: September 02, 2005, 10:27:40 PM »
Can you send me pleas an example...  :oops:
In witch file must I what add  :oops:


Thanks

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: [MOD] Multi-Language support for any text
« Reply #33 on: September 09, 2005, 10:56:31 AM »
Can you send me pleas an example... :oops:
In witch file must I what add :oops:
Please see the practical example in V@no's original posting! That should give you a hint, what to do. A complete step-by-step tutorial, what to do would be veeery long - because everybody has a different need to implement this and there are many variables on many places to be changed.

If I'm not misstaken, you also need add multilang to the code that handles keywords...dont know where exactly though, sorry.
Let me know if you find it, I need it too :)
I'm not sure at the moment if I need it - my first thought was to show only the keywords of the actual language, but then I decided that I will (in far future) hide the keyword-overview on the search form.
But if you'll find out a nice solution - let me know ;)
MAяTRIX


Offline donpedro

  • Full Member
  • ***
  • Posts: 110
    • View Profile
    • Baden bei Wien - Fotos einer Stadt
Re: [MOD] Multi-Language support for any text
« Reply #34 on: September 10, 2005, 11:43:07 AM »
TheOracle

Hi,
I think thats a really great MOD.
I only want to have my categories and subcategories in multilang mode, is this the right way ?

---> your post from  August 02, 2005, 12:10:45 AM

(I only want to be shure to do the correct changes)

regards
dp

TheOracle

  • Guest
Re: [MOD] Multi-Language support for any text
« Reply #35 on: September 10, 2005, 11:57:36 AM »
Quote

I only want to have my categories and subcategories in multilang mode, is this the right way ?


From which page exacly would you like to make those changes ?

Offline donpedro

  • Full Member
  • ***
  • Posts: 110
    • View Profile
    • Baden bei Wien - Fotos einer Stadt
Re: [MOD] Multi-Language support for any text
« Reply #36 on: September 10, 2005, 12:05:51 PM »
Hi,
I am not shure if Iunderstand your question

I am running my 4images with 6 languages and the only thing I am missing is the possibility to have my categories named and displayed in the several languages.

e.g.  "Strassen & Plätze"  in german = "Streets" in english = "Calles" in spanish and so on

http://www.badenfotos.com

thx
dp

TheOracle

  • Guest
Re: [MOD] Multi-Language support for any text
« Reply #37 on: September 10, 2005, 12:10:31 PM »
If you mean - generally speaking ; you'd need to find all :

Quote

"image_name" => $image_row['image_name'],


and change each of them to :

Code: [Select]

"image_name" => multilang($image_row['image_name']),


(and that includes the admin's content).

Offline donpedro

  • Full Member
  • ***
  • Posts: 110
    • View Profile
    • Baden bei Wien - Fotos einer Stadt
Re: [MOD] Multi-Language support for any text
« Reply #38 on: September 10, 2005, 12:17:02 PM »
only the cat names would be neough

TheOracle

  • Guest
Re: [MOD] Multi-Language support for any text
« Reply #39 on: September 10, 2005, 12:21:40 PM »
Would be this one, for all files, then :

Quote

"cat_name" => $image_row['cat_name'],


into :

Code: [Select]

"cat_name" => multilang($image_row['cat_name']),


Offline donpedro

  • Full Member
  • ***
  • Posts: 110
    • View Profile
    • Baden bei Wien - Fotos einer Stadt
Re: [MOD] Multi-Language support for any text
« Reply #40 on: September 10, 2005, 12:31:36 PM »
o.k. I will try it,

thx, have a nice weekend

dp

Offline Matthias70

  • Full Member
  • ***
  • Posts: 199
    • View Profile
    • Bildergalerie
Re: [MOD] Multi-Language support for any text
« Reply #41 on: September 10, 2005, 03:45:36 PM »
I have problems with the image_name in the clickstream on the detailview.
Example: http://www.gpaed.de/bildergalerie/details.php?image_id=40
Do I habe to change the code in the details.php.
When 'yes', what do I habe do change?

Thank you
Matthias

TheOracle

  • Guest
Re: [MOD] Multi-Language support for any text
« Reply #42 on: September 10, 2005, 03:48:43 PM »
Quote

I have problems with the image_name in the clickstream on the detailview.


Not too sure it has anything to do with this MOD but assure that you have the following context in your details.php file :

Code: [Select]

//-----------------------------------------------------
//---Clickstream---------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];

if ($mode == "lightbox" && $in_mode) {
  $page_url = "";
  if (preg_match("/".URL_PAGE."=([0-9]+)/", $url, $regs)) {
    if (!empty($regs[1]) && $regs[1] != 1) {
      $page_url = "?".URL_PAGE."=".$regs[1];
    }
  }
  $clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php".$page_url)."\" class=\"clickstream\">".$lang['lightbox']."</a>".$config['category_separator'];
}
elseif ($mode == "search" && $in_mode) {
  $page_url = "";
  if (preg_match("/".URL_PAGE."=([0-9]+)/", $url, $regs)) {
    if (!empty($regs[1]) && $regs[1] != 1) {
      $page_url = "&amp;".URL_PAGE."=".$regs[1];
    }
  }
  $clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."search.php?show_result=1".$page_url)."\" class=\"clickstream\">".$lang['search']."</a>".$config['category_separator'];
}
else {
  $clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
}
$clickstream .= multilang($image_name)."</span>";


Offline Matthias70

  • Full Member
  • ***
  • Posts: 199
    • View Profile
    • Bildergalerie
Re: [MOD] Multi-Language support for any text
« Reply #43 on: September 10, 2005, 03:53:33 PM »
Hi TheOracle,
I must have been blind.

It was this line in details.php
Code: [Select]
$image_name = htmlspecialchars($image_row['image_name']);
I've changed it to
Code: [Select]
$image_name = multilang(htmlspecialchars($image_row['image_name']));
Thank you for the fast answer
Matthias

TheOracle

  • Guest
Re: [MOD] Multi-Language support for any text
« Reply #44 on: September 10, 2005, 03:56:33 PM »
Excellent. Thanks for posting this.

In the mean time, don't forget this part :

Quote

$clickstream .= $image_name."</span>";


with :

Code: [Select]

$clickstream .= multilang($image_name)."</span>";