Jump to content

Erbenos

Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by Erbenos

  1. Hello,

    recently i came across this issue.

    Basically, I am using TemplateEngineBlade module which allows me to use Blade templating engine in my templates. I needed to translate strings like '__(<your string>)', but since the module compiles the templates into its own directory (as highlighted in screenshots), the language translator find the function call in 2 files:

    1. Template where the code is written
    2. Modules 'compiled'/cache directory where the templates are in their compiled state

    Now, I actually have to translate the string in its compiled directory else it  doesn't work at all. But since that filename changes often it is not usable at all.

    I tryed prepending all templates with a file (for example _init.php) and getting all translatable strings there which works but not for the use cases where i need to get same string translated in multiple languages in a single page - I would have to create separate variables.

    Does anyone have any idea which would help me work around my issue?

    Thanks

    14An4DA.png

    An0PCRj.png

  2. Whoa... this is kind of funny. There is setting specifically for what I want just below:

     

    # -----------------------------------------------------------------------------------------------
      # 14. OPTIONAL: Send URLs with non-ASCII name-format characters to 404 page (optimization)
      # -----------------------------------------------------------------------------------------------

      RewriteCond %{REQUEST_URI} "[^-_.a-zA-Z0-9/~]"
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.php?it=/http404/ [L,QSA]

    One may wonder how does he have utf8 page names and correct 404 redirects but oh well, this is just what i needed.

  3. Hello,

    I encountered interesting behaviour yesterday.

    I have custom module, which serves as 404 redirect which works like this: 

    $this->addHookAfter("ProcessPageView::pageNotFound", $this, "hook404Page");

    And in hook404Page function I return 404 page.

    The problem is while this does work for:

    http://testsite.dev/nonpage

    It doesn't work for non standard URL like these:

    http://testsite.dev/něnpage

    Any idea why? Thanks.

×
×
  • Create New...