can't edit this

How to edit this..change lang after error coming...
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!

" ' " is this problem

Comments

  • 422422 MVP
    edited March 2013

    you have to escape apostrophes \

  • x00x00 MVP
    edited March 2013

    http://en.wikipedia.org/wiki/Escape_character

    http://php.net/manual/en/language.types.string.php

    Single quoted

    The simplest way to specify a string is to enclose it in single quotes (the character ').

    To specify a literal single quote, escape it with a backslash (\). To specify a literal backslash, double it (\\). All other instances of backslash will be treated as a literal backslash: this means that the other escape sequences you might be used to, such as \r or \n, will be output literally as specified rather than having any special meaning.

  • If it is a translatable definition

    the double quote enclosure way

    $Definition["It looks like you're new here. If you want to get involved, click one of these buttons!"] = "My new message -new here";

    or

    the escaped quote way

    $Definition['It looks like you\'re new here. If you want to get involved, click one of these buttons!'] = "My new message -new here";

    but it may not be translatable -

    if you look in applications/dashboard/modules/class.guestmodule.php

    It seems like there is more to it than adding a definition.

        class GuestModule extends Gdn_Module {
    
           public $MessageCode = 'GuestModule.Message';
           public $MessageDefault = "It looks like you're new here. If you want to get involved, click one of these buttons!";
    
           public function AssetTarget() {
              return 'Panel';
           }
    
           public function ToString() {
              if (!Gdn::Session()->IsValid() && C('Garden.Modules.ShowGuestModule'))
                 return parent::ToString();
    
              return '';
           }   
    
    }
    
Sign In or Register to comment.