Los Angeles Galaxy midfielder Robbie Rogers, kicks the ball as Juventus forward Sebastian Giovinco gives chase during the second half of their International Champions Cup soccer match, Saturday, Aug. 3, 2013, in Los Angeles. (AP Photo/Mark J. Terrill)

WASHINGTON -- New York Attorney General Eric Schneiderman (D) announced Wednesday that Major League Soccer was launching an effort to protect current and future gay players from discrimination and harassment, following discussions with his office.

MLS will expand training for players and will post a Player Code of Conduct in home and visitor locker rooms underscoring that discrimination on the basis of sexual orientation is not allowed.

The league also will centralize the process for filing harassment and discrimination complaints by designating a lead MLS contact person. MLS pledged to protect from retaliation any person who makes a complaint or who cooperates in an investigation.

"Harassment and discrimination in the workplace -- whether in an office building, on the soccer field or a baseball diamond -- are illegal," Schneiderman said in a statement. "My office is committed to ensuring equal protection under the law for all employees no matter where they work, and I applaud Major League Soccer for working cooperatively with us to promote a culture of inclusion. Together, we are sending a powerful message that discrimination and harassment will not be tolerated in any form in the world of major league sports."

The new measures are part of the league's "Don't Cross the Line" anti-discrimination initiative, which launched last year.

The initiative "is a strong statement that we are a league that stands against discrimination,” said the MLS chief administrative officer, JoAnn Neale. "We are committed to providing a safe environment where everyone is treated equally, and with dignity and respect."

In February 2013, soccer player Robbie Rogers shook up the sports world and announced he was gay.

"I have been afraid, afraid to show whom I really was because of fear," Rogers wrote on his website. "Fear that judgement and rejection would hold me back from my dreams and aspirations. Fear that my loved ones would be farthest from me if they knew my secret. Fear that my secret would get in the way of my dreams."

Rogers said at the time that he would take a break from playing soccer. In May, he signed with the LA Galaxy and became the league's first openly gay player.

Schneiderman has worked with the National Football League and Major League Baseball on similar anti-discrimination efforts.

In April, the NFL said it would make sure its teams knew about the league's policies. Schneiderman stepped in after media reports said draft picks were being asked about their sexual orientation.