Translating Content Slot text with Falang

  • Kuniyo
    Inactive member
  • Topic Author
  • Member
  • Member
More
12 years 1 month ago #16380 by Kuniyo
:( I am using the hot destinations template with the HOT Designation module in my joomla 2.5 website. I would like to translate the text in the content slots of this module. It would be appreciated if you would advise how I can do this.

Please Log in to join the conversation.

  • milos
    Support Staff
  • Moderator
  • Moderator
More
12 years 1 month ago #16381 by milos
You can enter desired text in the content slots in module settings. If you need to change the module's settings language, you should create the language file for your language for this module.

Please Log in to join the conversation.

  • Kuniyo
    Inactive member
  • Topic Author
  • Member
  • Member
More
12 years 1 month ago #16383 by Kuniyo
Thanks Milos.

Will do.

Please Log in to join the conversation.

  • Kuniyo
    Inactive member
  • Topic Author
  • Member
  • Member
More
11 years 11 months ago - 11 years 11 months ago #18499 by Kuniyo
Hi Milos,

Back to this problem. Here are the changes I made to the files hoping to allow me to translate the "Content Slot" text in the Hot-designation module

Here are the changes in the modules/mod_hot_designation/mod_hot_designation.xml file
***********************************************************
//changes Calling both language files

<languages>
<language tag="en-GB">en-GB.mod_hot_designation.ini</language>
<language tag="ja-JP">ja-JP.mod_hot_designation.ini</language> </languages>
***********************************************************
// Then changed "text1" variable to "SLOTTEXTONE" in the below code
</field>
<field name="heading1" type="text" default="" label="LABEL HEADING" description="DESC HEADING" />
<field name="SLOTTEXTONE" type="textarea" cols="50" rows="2" default="" label="LABEL TEXT" description="DESC TEXT" />
<field name="link1" type="text" default="" label="LABEL LINK" description="DESC LINK" />
<field name="smallImage1" type="media" default="" label="LABEL SMALL IMAGE" description="DESC SMALL IMAGE" />
<field name="bigImage1" type="media" default="" label="LABEL BIG IMAGE" description="DESC BIG IMAGE" />
</fieldset>

Then I added the SLOTTEXTONE variable to my language/en-GB/en-GB.mod_hot_designation.ini file;then copied this whole file and renamed it to ja-JP.mod_hot_designation.ini.

I placed some dummy Japanese text in the SLOTTEXTONE="dummyJapanesetext" in the JP.mod_hot_designation.ini file, but it doesn't change when I change languages on the frontend of my website: www.raftingniseko.com

Your help again would be appreciated.

Thanks,
Kuniyo
Last edit: 11 years 11 months ago by Kuniyo.

Please Log in to join the conversation.

More
11 years 11 months ago #18510 by ivan.milic
That is no good, turn back all of your changes .

Open modules\mod_hot_designation\tmpl\default.php

find this:
Code:
<img align="left" src="<?php echo $mosConfig_live_site; ?>/<?php echo $smallImage[$loop]; ?>" width="<?php echo $smallPicWidth; ?>" height="<?php echo $smallPicHeight; ?>" alt="" /> <img src="<?php echo $mosConfig_live_site; ?>/<?php echo $bigImage[$loop]; ?>" width="<?php echo $bigPicWidthWithMargin; ?>" height="<?php echo $bigPicHeight; ?>" alt="" /> <h3><?php if($link[$loop] && $linkedTitles) { ?><a href="<?php echo $link[$loop]; ?>"><?php } echo $heading[$loop]; ?><?php if($link[$loop] && $linkedTitles) { ?></a><?php } ?></h3> <p><?php echo $text[$loop]; ?> <?php if($link[$loop]) { ?><a href="<?php echo $link[$loop]; ?>"><?php echo $readMore; ?></a><?php } ?></p> <hr />

Everyware you see:

$text[$loop]

replace it with:

JText::sprintf($text[$loop])

then in module settings for text value use something like:

TEXT1_LABEL,TEXT2_LABEL....

At then end add label translation for each language in .ini files:

TEXT1_LABEL="you en label for text1"
TEXT2_LABEL="you en label for text2"
...

In jp .ini

TEXT1_LABEL="you jp label for text1"
TEXT2_LABEL="you jp label for text2"
...

Please Log in to join the conversation.

  • Kuniyo
    Inactive member
  • Topic Author
  • Member
  • Member
More
11 years 11 months ago #18618 by Kuniyo
Thanks Milos,

I have made this changes, and the text is appearing as it is assigned in the en-GB... file at the moment.

I am not sure about the creation of the ja-JP.mod_hot_designation.ini file in the .../language/ja-JP/ folder. Your further help would be appreciated.

Can I just duplicate the en-GB file, place it in the .../ja-JP folder then rename it appropriately, and finally make the necessary translation inside the file?

Also, what changes are needed to the .../ja-JP/...xml files to call the newly added ja-JP.mod_hot_designation.ini file?

I notice there are ja-JP...sys.ini files for other modules. Do I need to create this file also?

Do I also have to make changes to the administrator/language/en-GB & .../ja-JP files, AND also the templates/hot_destinations/language/en-GB.tpl_... and .../ja-JP.tpl_... files?

Do I need to make any changes to the configuration files for the hot_designations module in order for it to display UTF-8 languages?

Sorry for all the questions.

Kuniyo

Please Log in to join the conversation.

Time to create page: 0.291 seconds
Powered by Kunena Forum