Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8815033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:16:29+00:00 2026-06-14T04:16:29+00:00

I followed the instructions of this link successfully, now my web is multilanguage without

  • 0

I followed the instructions of this link successfully, now my web is multilanguage without requiring put “locale” in the “traslate()” calls.
But I have to put the TextDomain each time that I call it.

    $this->traslate("Hello", __NAMESPACE__) //where __NAMESPACE__ is the text domain.

I would like set TextDomain in the onBootstrap method instead of put it in each call of the the “traslate()” helper.
I have tried with setTextDomain method, but it doesn’t exist.
Somebody know how do it?

The onBootStrap Code is following:

   .....//Code for define $locale.
   $sm = $e->getApplication()->getServiceManager();
   $translator = $sm->get('translator');
   $translator->setLocale($locale);
   $traslator->SetTextDomain($textdomain);   //This line not work!!!!!
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:16:30+00:00Added an answer on June 14, 2026 at 4:16 am

    Okey. We have advanced one step.

    The first solution works ok (the view solution), now my web page traduce texts only using this helper parameters, being Locale and TextDomain defined by the config:

    $this->translate(‘HELLO’);

    But the second solution not works. I don’t understand because the same plugin is accepted in the view and not in the onBootstrap when the name is the same.

    I rewrite my onBootstrap code bellow:

        $translator = $e->getApplication()->getServiceManager()->get('translator');
        $pm = $translator->getPluginManager();   //until here works ok.
        $pm->get('translate');   //this throws an error message how if 'translate' not found.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I followed the instructions in this post and this fiddle but I am confused
I followed the instructions in this site but there's no such code inside the
I've followed all instructions given on this site with an empty .vim folder, but
So I followed the instructions per this link http://www.opencart.com/index.php?route=documentation/documentation&path=32_35_60 but my paypal account is
I followed the instructions as listed in this link , and things compile Ok.
I've followed instructions from this question on SO to set up RVM, rubies and
I've followed the instructions in this MSDN article: http://msdn.microsoft.com/en-us/library/dd206945.aspx Is it possible to call
I'm trying to upgrade to Node v0.6.17. I followed the instructions in this post:
I'm a bit mystified as to how to do this. I have followed instructions
I followed the instructions: create the bean. This bean is for an enum transferred

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.