Author Topic: A Suggestions for multi langual site  (Read 8646 times)

0 Members and 1 Guest are viewing this topic.

Offline rockquick

  • Pre-Newbie
  • Posts: 7
    • View Profile
A Suggestions for multi langual site
« on: July 04, 2007, 04:28:58 AM »
Hello,

Thanks for the great job your are doing with 4images it is great one, but there is always the probleme with multilangual site I did try the sollution gave on the forum but it didnt work for :( anyways.. I have a little suggestion for exemple if some one want a multilanguage site he can active it from the adminstration section, and when he add a category he can give the name in the different language forr exemple :
Name of the Category in Database : Space

Traslation in English : Space
Translation in French : Espace

so the name of the category in the datebase will stay always space you dont have 2 create 2 category in the databse all you have to do is create one, and when you change the language it will directry get the information from the translations files
sorry for my english it is not that good...
Thanks for the Good job :)

manurom

  • Guest
Re: A Suggestions for multi langual site
« Reply #1 on: July 30, 2007, 02:34:41 AM »
Hello, all;
this feature already exists but not completely in 4images 1.7.4. Upload the language pack you need to use to your site.
Then type: http://www.your_site.com/your_gallery/index.php.l=spanish to get the interface displayed in spanish, for example.

In addition, V@no (whoelse?) did a MOD to have any text with multilanguage support here.

I have tested V@no's MOD here: http://amissc.free.fr/test/ and got entire satisfaction.
But there are many files to modify. I moded them all (I suppose and hope I had not forgotten anything) and posted them in a ZIP archive here for 4images 1.7.4 users.

Bonuses:

You want to add your own text and have it multilingual compliant.
Lets say your text label is "Welcome" and its content is "Welcome to our site...Blah blah blah..."
  • Open the file includes/page_header.php
Find:
Code: [Select]
  "direction" => $lang['direction']
));
and replace by:
Code: [Select]
"direction" => $lang['direction'],
  "lang_welcome" => $lang['welcome'],  //we declare here the title
  "lang_welcome_text" => $lang['welcome_text']  //here we declare the welcome text
));

You now have to insert the translation in each lang/language/main.php file.
Find, in main.php:
Code: [Select]
//-----------------------------------------------------
//--- Paging ------------------------------------------
//-----------------------------------------------------

and add just before:
english example:
Code: [Select]
//-----------------------------------------------------
//--- Personnal texts ----------------------------------------
//-----------------------------------------------------
$lang['welcome'] = "Welcome";
$lang['welcome_text'] = "This is a welcome text";

french example:
Code: [Select]
//-----------------------------------------------------
//--- Textes persos ----------------------------------------
//-----------------------------------------------------
$lang['welcome'] = "Bienvenue";
$lang['welcome_text'] = "Ceci est un texte de bienvenue";
...and so on with the several languages you use.

You can now insert in your HTML template files the tags {lang_welcome} and {lang_welcome_text} where you want them to be displayed, and keeping multilanguage support.

You also want to have header images or banner images including text translated when people click on a language flag.
Edit your image in your favourite image editor, and (sorry), make every translation needed. For instance, if your image is called "whatamess.jpg", containing your site slogan, edit it and custom in each language you need to use.
If you custom it in spanish, save it as "whatamess.jpg" in your_template/images_spanish/ folder.
If you custom it in french, save it as "whatamess.jpg" in your_template/images_french/ folder.
Then, insert it in your HTML template fie code:
Code: [Select]
<img src="{template_lang_image_url}/whatamess.jpg" alt="" />
The script will scan every language_images folder and display it, if only you have made a localized image.


Offline davidcalvin

  • Pre-Newbie
  • Posts: 2
    • View Profile
    • translate spanish to english
Re: A Suggestions for multi langual site
« Reply #2 on: October 23, 2018, 10:14:46 AM »
A multilingual site is not just about coding. It involves research on which language to be used for the target market, localization options, how the apps will render in each language etc. The best thing is to rely on a professional language service agency who can combine human translation with machine learning to bring the best outcome. Read this to know what I am referring to https://www.mayflowerlanguages.com/multilingual-content-marketing-strategy/