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

  • Home
  • SEARCH
  • 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 7746551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:18:28+00:00 2026-06-01T10:18:28+00:00

When setting the title attribute in Zend_Form, this is not being translated. (Label &

  • 0

When setting the title attribute in Zend_Form, this is not being translated. (Label & errors are translated fine)

// form file

$email = new Zend_Form_Element_Text('username');
$email->setLabel('auth.form.login.username')
      ->setRequired(true)
      ->addFilter('StripTags')
      ->addFilter('StringTrim')
      ->addFilter('StringToLower')
      ->addValidator('NotEmpty')
      ->setAttrib('title', 'auth.form.login.username');

// resource file

...
<tu tuid='auth.form.login.username'>
   <tuv xml:lang="en"><seg>Username</seg></tuv>
</tu>
...

Current result: auth.form.login.username

Expected result: Username

  • 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-01T10:18:29+00:00Added an answer on June 1, 2026 at 10:18 am

    This is a normal behavior, nothing wrong with it.

    The setAttrib() method doesn’t translate its value parameter, so you need to use a Zend_Translate adapter as follows:

    $email->setAttrib('title', $this->getTranslator()->translate('auth.form.login.username'))

    This should fix your problem.

    See Standard I18n Targets for more information.

    Now that you’ve attached a translation object to, what exactly can you
    translate by default?

    • Validation error messages.
    • Labels.
    • Fieldset Legends.
    • Form and Element Descriptions.
    • Multi-option Values.
    • Submit and Button Labels.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using a navigation controller, I am pushing a new view and setting the title
As the title suggests... I'm setting up a superfish menu using the Wordpress CSS
Setting up the sandboxes for all these option is not feasible right now. So
Setting the src attribute of an IFrame to data:application/pdf;base64, isn't working for me, any
My NSTreeController is setting Core Data parent attributes but not children attributes. I have
I'm using XslCompiledTranform to transform XML/XSL. This is my test XSL: <span title={./tooltip} anattribute={./tooltip}>
I have the following file: <html> <head> <title></title> <link rel=css type=text/css href=/empty.css title=css />
I am setting up an XML file for a web site that I am
I have a application for android 2.3.3 where I am setting some custom titles
What the title says. Is there a way to change intellisense settings (intellisense box

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.