3

Hi I just got into wordpress theme development and I have seen many developers when setting the attribute for in for a function in an array use this sintax:

'name' => __( 'Portfolio'),   
'singular_name' => __('Portfolio'),

I have tryed it and I could not find it any difference then writing it like this:

'name' => 'Portfolio',   
'singular_name' => 'Portfolio',

Aldo I am a total beginner in both php and wordpress so maybe that's why.

So is there a difference beetween the two ways of writing?If so witch is better?

1 Answer 1

4

This is the Wordpress method of returning the proper language value through the localization module. Check this link for more details:

http://codex.wordpress.org/Translating_WordPress

Sign up to request clarification or add additional context in comments.

2 Comments

So in other words if I am not using a different dialect or alphabet it is not necesary to use it right?
Yes, but it isn't a bad idea, as this can make your site accessible to a broader audience.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.