Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.

Allows several translation files for same domain / locale #3262

Closed
neilime wants to merge 5 commits into
zendframework:masterfrom
neilime:master
Closed

Allows several translation files for same domain / locale #3262
neilime wants to merge 5 commits into
zendframework:masterfrom
neilime:master

Conversation

@neilime
Copy link
Copy Markdown
Contributor

@neilime neilime commented Dec 20, 2012

For exemple :

Translator config

//Add Zend translations files for validator (Zend_Validate & Zend_Captcha)
'translation_files' => array(           
    array(
        'type' => 'phparray',
        'filename' =>  getcwd().'/vendor/zendframework/zendframework/resources/languages/en/Zend_Validate.php',
        'locale'  => 'en_US',
        'text_domain' => 'validator'
    ),          
    array(
        'type' => 'phparray',
        'filename' =>  getcwd().'/vendor/zendframework/zendframework/resources/languages/en/Zend_Captcha.php',
        'locale'  => 'en_US',
        'text_domain' => 'validator'
    )
)

@ghost ghost assigned weierophinney Jan 2, 2013
@weierophinney
Copy link
Copy Markdown
Member

I need tests, please. :)

Also, you appear to have removed usage of goto in favor of code duplication -- can you explain why? I'd argue it may make sense to move code into helper methods to remove the duplication if you go this route.

@neilime
Copy link
Copy Markdown
Contributor Author

neilime commented Jan 3, 2013

  • Tests added.
  • I've removed usage goto to allow several type of loader for same domain / locale. There is no really duplication of code.
    Each loading / merging ways are differents.

Cache proccess is running only if messages have been loaded.

@weierophinney
Copy link
Copy Markdown
Member

Merged to develop branch for 2.1 (new functionality).

prolic pushed a commit to prolic/zf2 that referenced this pull request Jan 3, 2013
weierophinney added a commit to zendframework/zend-i18n that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants