Results 1 to 10 of 32

Thread: Multilingual add-on for Open-Realty v.3.x

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Multilingual add-on for Open-Realty v.3.x

    I have just posted a new free add-on: Multilingual add-on for O-R v.3.x
    You can download from here: http://addons.open-realty.org/add-on-35.html

    The Multilingual Add-on IS NOT compatible with Open-Realty v.3.1.0 or greater.

    It is "the start" and this add-on will require several releases... the goal is to end with a real solution to have a fully Multilingual O-R Website or at least the most possible.

    Today I have released the version 1.0.0 - for now, you may expect ONLY it to act as a Template Changer AND as a Language Changer. The add-on requires you to have Site Template folders named the same as the add-on language folders (yes, only the ones you wish to have). The add-on also requires a special setting at Site Config, "General" tab, on "Security Settings" at the end of the page you need to set "Allow template switching" and "Allow language switching" to "YES".

    I know... you will have questions. Feel free to post it here.
    My suggestion: copy and rename LAZULI site template folder to "en" and "es". Place the add-on tag {addon_multilingual_select} at your main.html template file and you will have the options to change language from English to Spanish. Make tests, edit the language files and replace the texts at your HTML template files with language tags - I bet you will have fun.

    DEMO (actually in 4 languages: English, French, German and Portuguese): http://goo.gl/MhlLm

    Eduardo

    Dec,02/2010 - released v.1.0.1 - included new function for new add-on tag {addon_multilingual_listfield_#} to be used at listing detail HTML template files.
    Dec,03/2010 - released v.1.0.2 - included new function to obfuscate email addresses, included rel="external" to URL listing field type, included HTML help file, improved the code in general and updated some language files.
    Dec,05/2010 - released v.1.0.3 - included 4 new functions "getpage", "getpagetitle", "metadescription", "metakeywords" to handle pages stored at the database (please read the included help file for more details).
    Dec,06/2010 - released v.1.0.4 - included new function multilingual_property_class_checkboxes to perform translations at search_class_default.html
    Dec,13/2010 - released v.1.0.5 - fixed bug on uninstallation code, add-on tag {addon_multilingual_select} deprecated and created 2 new tags, included new function multilingual_search_fields to be used at search_page_#.html, included new function addon_multilingual_replace_headers to be used at search_result_#.html, included new function addon_multilingual_current_language and improved and encrypted (IONCUBE) the add-on core code (multilingual_core.inc.php).
    Last edited by ebmarques; 03-31-2011 at 04:38 PM. Reason: released v.1.0.5

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  2. #2
    Join Date
    Dec 2010
    Posts
    8

    Default Re: Multilingual add-on for Open-Realty v.3.x

    Hello Eduardo,

    I am new to open-realty and I am interested in multilangual feature because I need to make a website in English, French and Spanish.
    I downloaded the addon above and installed it, I see the dropdown menu with the 3 options but the menu on the left doesn't translate?

    You can see it using this link:
    http://www.servicespremium.com/openrealty/

    Any help will be apreciated...

    Thank you,
    Angelo

  3. #3
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: Multilingual add-on for Open-Realty v.3.x

    Quote Originally Posted by aciciotti View Post
    ...I downloaded the addon above and installed it, I see the dropdown menu with the 3 options but the menu on the left doesn't translate?...
    Hi Angelo,

    I was expecting a question like yours!
    Congrats... you did very well creating Site Template folders named "en", "es" and "fr".
    BUT... there is more to do. There is a "home work". You need to edit ALL yours HTML template files (yes, at all folders - main files, listing detail files, search files, etc...) and replace hardcoded texts with language tags. The add-on will not do that for you... For example, at yours "main.html" (3 files, one at each folder) you will find:

    Code:
    <li><a href="{url_index}">HOME</a></li>
    <li><a href="{page_link_3}">ABOUT US</a></li>
    <li><a href="{page_link_2}">CONTACT US</a></li>
    Replace to:

    Code:
    <li><a href="{url_index}" title="{lang_menu_home}">{lang_menu_home}</a></li>
    <li><a href="{page_link_3}" title="{lang_menu_about_us}">{lang_menu_about_us}</a></li>
    <li><a href="{page_link_2}" title="{lang_menu_contact_us}">{lang_menu_contact_us}</a></li>
    Voilá! You have your menu translated.

    BUT... notice this add-on is at a very early stage!!! Notice I have just released version 1.0.2 (update using the Add-on Manager). So far, I am working only at "frontend". I haven't "arrived" at the search page. Many add-on releases will follow and I bet it will take MONTHS to have the add-on working as we wish.

    Do you wish to help us to get this add-on developed? If yes, keep trying and bringing problems.

    Eduardo

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  4. #4
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: Multilingual add-on for Open-Realty v.3.x

    Just tested French at my local installation and found out the add-on French language file is missing a lot of required variables. For now, you will need to get the English language file and update the French one.
    As I said, there is still a lot of work ahead...
    Eduardo

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  5. #5
    Join Date
    Jun 2006
    Location
    Alajuela, Costa Rica
    Posts
    107

    Default Re: Multilingual add-on for Open-Realty v.3.x

    Hello Eduardo!
    I was looking for a new way to do the multi-lingual, but was looking in the wrong place!
    THANK YOU!
    Ryan sent me this link as UMP is apparently not compatible with the new PHP 5.3
    I want to try this new add-on, I know I will have lots of questions. I have until March to get this figured out.
    Do you need help with the translations? I can help with the Spanish.
    Let me know
    Silence is golden....
    but Duck tape is silver!!
    My site: www.crfirst.com

  6. #6
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: Multilingual add-on for Open-Realty v.3.x

    Quote Originally Posted by Terrytica View Post
    ...I want to try this new add-on, I know I will have lots of questions. I have until March to get this figured out. Do you need help with the translations? I can help with the Spanish. Let me know
    Yeah, highly recommended to try before deciding for it.
    I already have a new version to be released but I wish to release it with the add-on documentation - to write the documentation is something very annoying to me!
    Have you seen the DEMO? It is much better than UMP.

    About translations, help is always welcome. Please read post#1 at this thread:
    http://support.open-realty.org/showthread.php?22328

    Eduardo

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  7. #7
    Join Date
    Dec 2010
    Posts
    8

    Default Re: Multilingual add-on for Open-Realty v.3.x

    Quote Originally Posted by ebmarques View Post
    Hi Angelo,

    I was expecting a question like yours!
    Congrats... you did very well creating Site Template folders named "en", "es" and "fr".
    BUT... there is more to do. There is a "home work". You need to edit ALL yours HTML template files (yes, at all folders - main files, listing detail files, search files, etc...) and replace hardcoded texts with language tags. The add-on will not do that for you... For example, at yours "main.html" (3 files, one at each folder) you will find:

    Code:
    <li><a href="{url_index}">HOME</a></li>
    <li><a href="{page_link_3}">ABOUT US</a></li>
    <li><a href="{page_link_2}">CONTACT US</a></li>
    Replace to:

    Code:
    <li><a href="{url_index}" title="{lang_menu_home}">{lang_menu_home}</a></li>
    <li><a href="{page_link_3}" title="{lang_menu_about_us}">{lang_menu_about_us}</a></li>
    <li><a href="{page_link_2}" title="{lang_menu_contact_us}">{lang_menu_contact_us}</a></li>
    Voilá! You have your menu translated.

    BUT... notice this add-on is at a very early stage!!! Notice I have just released version 1.0.2 (update using the Add-on Manager). So far, I am working only at "frontend". I haven't "arrived" at the search page. Many add-on releases will follow and I bet it will take MONTHS to have the add-on working as we wish.

    Do you wish to help us to get this add-on developed? If yes, keep trying and bringing problems.

    Eduardo
    __________________________________________________ _________
    I Eduardo,
    I am sorry for not replying sooner. I had to put this project on the back burner for some time. I want to thank you very much for your reply, this worked like a chram.
    I modified other pages with great success.

    The only page I have a hard time getting to work properly is the detail listing. All the tags Address, City, Post Code, etc... They seem to be displayed using the {feature1} and {feature2} tags and I can't figure out how those ones get translated?

    If you have any ideas (I'm sure you do) it will help me a lot.

    Again THANK YOU very much for your help.

    Angelo

  8. #8
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: Multilingual add-on for Open-Realty v.3.x

    Hi Angelo,

    What you ask should be already at the help file. But I am still writing it. With the next release it will be there. So here goes a copy/paste from the help file that will be attached at the add-on:

    With this add-on, "you cannot" have section tags at your LISTING DETAIL HTML template files. You will need to replace those tags with add-on tags - one add-on tag for each field that should be included at the section tags.

    Insert the add-on tag {addon_multilingual_listfield_#} at your LISTING DETAIL HTML template files replacing the "Listing Template Sections" tags (for example: {top_left}, {top_right}, {center}, etc) with this add-on tag. Where "#" is the LISTING FIELD NAME to be translated. Be sure you have the correspondent PHP language variables at the language files. This add-on tag also works (exactly the same way) at the SEARCH RESULT HTML template files.

    Assuming LAZULI site template and "listing_detail_default.html" template file we have for example:
    Code:
    <div class="float_left_half">
        {top_left}
    </div>
    Replace/remove the section tag "{top_left}" so you will end with:
    Code:
    <div class="float_left_half">
        {listing_field_address_block}{addon_multilingual_listfield_address}{/listing_field_address_block}
        {listing_field_city_block}{addon_multilingual_listfield_city}{/listing_field_city_block}
        {listing_field_state_block}{addon_multilingual_listfield_state}{/listing_field_state_block}
    </div>
    Follow the same procedure and logic for all others section tags.

    ATTENTION: For each add-on tag {addon_multilingual_listfield_#} you are going to use, if you don't have previously created PHP language variables for each field name (and field elements if the case) the Multilingual add-on will detect the missing PHP language variable and will print at your pages this text: "NOT TRANSLATED". The Multilingual add-on will NOT translate the field elements for the following field types: "date", "decimal", "number", "email", "price", "latitude", "longitude", "text", "textarea" and "url" - so for those field elements you shall NOT have correspondent PHP language variables.
    For the field type "email" the Multilingual add-on will automatically OBFUSCATE the email address printed at your pages. For the field type "url" the Multilingual add-on will automatically include "rel=external" at the HTML code link (it will be handled by jQuery, loaded by default at Open-Realty®).

    Once you have previously created and configured listing classes, listing fields, agent fields and member fields, now you need to be sure the language files have the correspondent translations (PHP variables).
    In spite of editing the Open-Realty® language files, in fact it is HIGHLY recommended to CREATE custom language files (yours own language files) placed at "../include/language/xx/custom/" - for example, at each "custom" folder you can create NEW language files and name them as "my_lang.inc.php". Doing this way you will not have any file replaced when updating Open-Realty®. The easiest way: just RENAME the default "example.inc.php" language files you will find inside the "custom" folders. Assuming you have renamed those files to "my_lang.inc.php", now you will have this file at each language "custom" folder and those are the files you will need to edit.

    Lets say you have created the following listing field:
    listing field name: home_features
    with this field caption: Home Features
    and with these field elements: Balcony||Patio/Deck||Waterfront||Gas Range
    That means you will need to have at yours "my_lang.inc.php" language files these PHP variables:

    $lang['Home Features'] = 'Home Features'; // <-- field CAPTION
    $lang['Balcony'] = 'Balcony'; // <-- field ELEMENT
    $lang['Patio/Deck'] = 'Patio/Deck'; // <-- field ELEMENT
    $lang['Waterfront'] = 'Waterfront'; // <-- field ELEMENT
    $lang['Gas Range'] = 'Gas Range'; // <-- field ELEMENT
    So you can use the add-on tag "{addon_multilingual_listfield_home_features}" at your HTML template files (more details about it in another topic).

    IMPORTANT:
    - notice you are going to use the field NAME at the add-on tag but at the language file you will use field CAPTION and ELEMENTS (also notice they are "case sensitive");
    - repeat the above procedure for ALL listing, agent and members fields you have previously created;
    - this add-on will NOT translate field elements for the following field types: "date", "decimal", "number", "email", "price", "latitude", "longitude", "text", "textarea" and "url" - so for those field types you shall NOT have any correspondent PHP language variables for its field elements.

    Eduardo

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  9. #9
    Join Date
    Dec 2010
    Posts
    8

    Default Re: Multilingual add-on for Open-Realty v.3.x

    Hi Eduardo,

    Thank you again for your help.

    I did what you posted above and I have to say that it works great for the Spanish site and doesn't sow up in the French site??? Can't understand why? I compared the two translation files (es and fr) and they bothe contain the same translation variables so It's beyond me to understand exactly what is goign on?

    You can check for yourself using this link: http://servicespremium.com/openrealty

    Also, you will see that the language combo is screwed up. there is like a frame around it and I can't get rid of it. If you know what to do to remove it I will be very happy ;-))

    Other than that I am starting to understand how everything communicates and it's helping me to make intelligent changes to my template.

    Thank you again,

    Angelo

Similar Threads

  1. Upgrading Open-Realty 2.x Templates For Open-Realty 3.x
    By greengiant in forum Announcements
    Replies: 0
    Last Post: 06-24-2010, 03:16 PM
  2. U.M.P. - Unofficial Multilingual Patch for Open-Realty®
    By ebmarques in forum Language help, ideas, discussion & Releases (CLOSED)
    Replies: 566
    Last Post: 06-17-2010, 11:31 PM
  3. Replies: 0
    Last Post: 05-31-2010, 04:19 PM
  4. Open-Realty 1.1.5b to Open-Realty 2.0 Upgrade Notes.
    By greengiant in forum HELP (CLOSED)
    Replies: 20
    Last Post: 12-07-2007, 11:58 PM
  5. U.M.P. - Unofficial Multilingual Patch for Open-Realty®
    By ebmarques in forum General Discussion
    Replies: 0
    Last Post: 02-16-2007, 12:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •