This is the code:
<?php if ( $current_language == es-ES ) : ?>
<?php next_post_link( '%link', 'Proyecto Siguiente ' . _x( '', 'next post link', 'twentyten' ) . '' ); ?>
<?php elseif($current_language == zh-TW) : ?>
<?php next_post_link( '%link', '下一個項目 ' . _x( '', 'next post link', 'twentyten' ) . '' ); ?>
<?php elseif($current_language == zh-CN) : ?>
<?php next_post_link( '%link', '下一个项目 ' . _x( '', 'next post link', 'twentyten' ) . '' ); ?>
<?php else : ?>
<?php next_post_link( '%link', 'Next Project ' . _x( '', 'next post link', 'twentyten' ) . '' ); ?>
<?php endif; ?>
For some reason, I’m still getting ‘Proyecto Siguiente” even if the lang is set to zh-TW (Chinese Traditional).
Any suggestion?
You are not quoting the strings agains which you are comparing, so PHP is taking them to be constants (which do not exist). It will still work because PHP first looks for a constant named es-ES and will throw an error of level E_NOTICE (undefined constant). Try:
and so on.