Key Language in Block HTML

Friends,

 

How do I insert a key language in a html block on the homepage?

Example: <bx_text:_text_home />

 

Thank you.

Quote · 9 Apr 2012

You most likely need to use a php block, not an html block. There are a couple of free mods in the market that allow you to do that. Then you can use php language snippets.

Quote · 10 Apr 2012
I'm already using PHP, but where I call the key language he no longer recognizes, rather than their text appears white as it appears to have nothing.
If you inspect the HTML it is there, but the text does not.
Quote · 10 Apr 2012

you can use a dolphin function in a php block

function is very simple

_t('_your_text_string');

it should work..:)

so much to do....
Quote · 10 Apr 2012
It worked properly.
Thank you.
Quote · 10 Apr 2012

you're welcome.Smile

so much to do....
Quote · 10 Apr 2012

Hi

In HTML it's <bx_text:_text_home /> and php it's _t('_your_text_string');

 

But is there a javascript way to do it ?

I'm developing some ajax modules and in my .js files on error messages, I type

var errorMessage = " <bx_text:_text_home />"; but it returns empty text and in the source code I see the <bx_text:_text_home />

Is ther a way around ?

Thanks

Quote · 21 Apr 2012

 

Hi

In HTML it's <bx_text:_text_home /> and php it's _t('_your_text_string');

 

But is there a javascript way to do it ?

I'm developing some ajax modules and in my .js files on error messages, I type

var errorMessage = " <bx_text:_text_home />"; but it returns empty text and in the source code I see the <bx_text:_text_home />

Is ther a way around ?

Thanks

 
Dolphin provides a JS version. It's the same as the PHP version.

var errorMessage = _t('_my_language_key');


https://www.deanbassett.com
Quote · 21 Apr 2012

Hi,

it didn't worked

var errorMessage = _t('_SomeThing'); and the output is _SomeThing

The key _SomeThing is im my language keys

I saw in some forums on the web that people have some problems getting javascript to execute in a ajax loaded content.

is it because it's an ajax loaded content ?

Quote · 21 Apr 2012

Quite possible. All of the normal js files that are on a dolphin page may not be on the page you're loading with ajax. Especially if it not a dolphin page.

You will have to experiment.

The _t function dolphin uses in javascript is defined in inc/js/functions.js

All of my ajax calls i make with jQuery from in a dolphin module, and i always call content thats in a action that is also inside a dolphin module so all the needed JS functions are normally available.

https://www.deanbassett.com
Quote · 21 Apr 2012

Hi,

I have my <script language="javascript" type="text/javascript" src="jquert/validation.js"></script> in the _header.html and it still doesn't work.

it's a jquery validation form :

http://docs.jquery.com/Plugins/Validation

Quote · 22 Apr 2012

Hi,

I even tried (in _heder.hmtl)

<script type="text/javascript">

   var test = _t('_add');

   console.log (test);

    </script>

The output in the console is _add 

Do I miss something ?

Quote · 24 Apr 2012

Hi,

I made it work ;), but this way :

<script type="text/javascript">

   var test = "<bx_text:_add />";

   console.log (test);

    </script>

Quote · 24 Apr 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.