Yii Framework Forum: [solved] I18N how to make blank translation - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[solved] I18N how to make blank translation Rate Topic: -----

#1 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 09 May 2010 - 09:46 AM

Hey,

I have one question here:)

If webapp uses Yii::t('webapp','message'), how do I set webapp.php file to use blank translation?

e.g.

return array (
'message' => '_blank_',

);

Thanks
CoLT
0

#2 User is offline   Gevik 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 86
  • Joined: 29-November 09
  • Location:The Netherlands

Posted 10 May 2010 - 08:47 AM

The message translations go into application/messages/XX/file.php. (XX = two letter language code)
For example in:

application/messages/nl/webapp.php

return array(
message => '_blank_'
);

I hope this helps.

Ext4Yii, The ExtJS extension for Yii Framework ext4yii.com

Ext4Yii API examples

Follow us on twitter



Developer of Ext4Yii Framework
0

#3 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 10 May 2010 - 11:24 AM

View PostGevik, on 10 May 2010 - 08:47 AM, said:

The message translations go into application/messages/XX/file.php. (XX = two letter language code)
For example in:

application/messages/nl/webapp.php

return array(
message => '_blank_'
);

I hope this helps.


Hm, I would like to add blank space e.g. 'message' => ''
Because now it uses 'message' instead of ''

CoLT
0

#4 User is online   tri 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,651
  • Joined: 20-November 08
  • Location:Stockholm, Sweden

Posted 10 May 2010 - 11:50 AM

View PostCoLT, on 10 May 2010 - 11:24 AM, said:

Hm, I would like to add blank space e.g. 'message' => ''
Because now it uses 'message' instead of ''

CoLT


'message' => false

seems to work

/Tommy
Don't forget to read The Definitive Guide to Yii (en) (sv) | The class reference has the details
0

#5 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 10 May 2010 - 11:56 AM

View Posttri, on 10 May 2010 - 11:50 AM, said:

'message' => false

seems to work

/Tommy


Yep, that worked correctly! Problem solved. :)

Thanks
CoLT
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users