WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] <?php _e('Mystringvalue', 'sandbox'); ?> (5 posts)

  1. danielwalters6
    Member
    Posted 6 years ago #

    Hi, could someone point in the right direction (or provide) an explanation what <?php _e('Mystringvalue', 'sandbox'); ?> does differently rather than just an echo.

    Does it look to a language file, and return the variable 'Mystringvalue' ?

    Thank you for any help you can provide.
    - I'm building a new wordpress theme for a corporate intranet, based on the sandbox theme.

  2. Austin Matzko
    Member
    Posted 6 years ago #

    It has to do with translation localization for WordPress, which you can read more about here, for WordPress in general, and here for WordPress plugins and themes.

    Basically, _e( will call a localized file if available, under the "sandbox" domain, and echo it.

  3. danielwalters6
    Member
    Posted 6 years ago #

    Thank you for this. . . Where can I find the localized file in the sandbox domain?

    Cheers

    dan

  4. Austin Matzko
    Member
    Posted 6 years ago #

    Where can I find the localized file in the sandbox domain?

    I'm not sure what you're asking. If you're asking, "where are there translated files for the sandbox domain, which is used in the Sandbox WordPress theme?" then the answer is that you can learn more about them here, but generally most already are included with Sandbox.

    If you're asking, "where does one put the localized files so that Sandbox will find and use them?" then the answer is to put them in the theme directory. So for example, if your language code is for Chinese -- Hong Kong, then Sandbox would expect to see a zh_HK.mo file in the wp-content/themes/sandbox/ directory.

  5. danielwalters6
    Member
    Posted 6 years ago #

    Thank you - your link resolved my question. :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.