problem with add language.

I added a key to the admin panel under the category system then i also added the key in the translation php files

and when i put the key value in my temlplate with double underscores nothing happens.

i try it with __copyright__ in my template file where i want the text and it's shows the correct translation.

So i know it should work, but not with my own choosen key.

I also cleared the cache each time i looked in the browser (control+f5)

http://www.busimatch.club ( The most exclusive business club)
Quote · 17 May 2013

the language keys are not in the __key__ format. They are _key format.

the items you see in an .html file like __key__ are actually variables from an sql query that is within the code. Depending on what you are trying to display will determine where in the code it is at, and/or where you need to add your variables.

 

Example. WHen looking at your account page, the Account block has a bunch of information in it. If you look at the thumbnail_single.html file, you will see a variable as __user_title__. This variable comes from the BxBaseFunctions.php page. It is called from a database query. Similar to what I have below. Mine is different because I have changed my account block and added new variables, but I hope it helps you unsderstand what is going on

 

 $aVariables = array(
            'iProfId' => $iId ? $iId : 0,
            'sys_thb_float' => $sFloat,
            'classes_add' => ($bGenProfLink ? ' thumbnail_block_with_info2' : '') . ($sType != 'medium' ? ' thumbnail_block_icon2' : ''),
            'sys_status_icon' => $sStatusIcon,
            'sys_status_title' => $oUserStatusView->getStatus($iId),
            'usr_profile_url' => $sLink,
            'usr_thumb_url0' => $sThumbUrl,
            'usr_thumb_title0' => $sUserTitle,
            'bx_if:profileLink' => array(
                'condition' => $bGenProfLink,
                'content' => array(
                    'user_title' => $sUserTitle,
                    'user_address' => $aProfile['Address'],
                    'user_address2' => $aProfile['Address2'],
                    'user_city' => $aProfile['City'],
                    'user_state' => $aProfile['State'],
                    'user_zip' => $aProfile['zip'],
                    'user_phone' => $aProfile['Phone'],
                    'user_email' => $aProfile['Email'],
                    'member_id' => $aProfile['ID'],
                    'user_info' => $sUserInfo,
                    'usr_profile_url' => $sLink,
                ),

 

looking at the above code, you will see 'user_title' => $sUserTitle,

the 'user_title' variable is in the html file is the __user_title__

caredesign.net
Quote · 17 May 2013

But, i don't understand that he do it for _copyright (that was in the system) and not _copyrighta like i did.
How to do it on a simplier way, maybe in html block?

http://www.busimatch.club ( The most exclusive business club)
Quote · 17 May 2013

 

But, i don't understand that he do it for _copyright (that was in the system) and not _copyrighta like i did.
How to do it on a simplier way, maybe in html block?

 Read this topic and see if you get a better understanding of how the language keys work in Dolphin.

http://www.boonex.com/forums/topic/Mutiple-Questions-on-how-to-do-.htm

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 17 May 2013

Keys that look like this _key are language keys. Keys that look like this __key__ are template keys.

The keys of type __key__ have to have supporting code to process them.

To use a language key in a template file you do it like this. <bx_text:_language_key />

Not like this __key__

NOTE: This only works for actual template files. .html files that exist in the template folder. If that's not where you are using it then you will need to explain further. I don't think you are understanding the difference between _key and __key__




https://www.deanbassett.com
Quote · 17 May 2013

 

I don't think you are understanding the difference between _key and __key__

 that was my thought, and I tried to explain as best as I could. Hope I did not confuse things more

caredesign.net
Quote · 17 May 2013

 

 

I don't think you are understanding the difference between _key and __key__

 that was my thought, and I tried to explain as best as I could. Hope I did not confuse things more

Not sure if he will understand. It's not a easy thing to grasp and explaining it is not easy either.

Not to mention i think there is a language barrier as well which complicates it even more. To much is lost in translation sometimes.

https://www.deanbassett.com
Quote · 17 May 2013

 

maybe in html block?

 Language keys cannot be used in HTML blocks at all.


https://www.deanbassett.com
Quote · 17 May 2013

I also learned something new, thanks Deano..!

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 17 May 2013
 
 
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.