1. In the articale metadata enter author names in both locales. Of course this doubles the number of authors, but by applying the following modification in template files you can show only one set of author names at a time. It does not matter how to intermix the order of two locale names but you must keep the order of authors for each locale independently. An easy to remember method is to enter all author names for the first locale and then repeat it for the next local.
2. in the file templates/issue/issue.tpl use mb_detect_encoding function to pick only those names which is relevant to the current page locale. A possible way of doing this is to insert following code
- Code: Select all
{if $currentLocale eq "en_US"}
{if mb_detect_encoding($author->getFullName(), "ASCII, UTF-8") eq "ASCII"}
{$author->getFullName()|escape}{if !$smarty.foreach.authorList.last},{/if}
{/if}
{else}
{if mb_detect_encoding($author->getFullName(), "ASCII, UTF-8") eq "UTF-8"}
{$author->getFullName()|escape}{if !$smarty.foreach.authorList.last},{/if}
{/if}
{/if}
after
- Code: Select all
<td style="padding-left: 30px;font-style: italic;">
{foreach from=$article->getAuthors() item=author name=authorList}
Similar modification may be applied to the templates/article/article.tpl to view the author names in the abstract (or html full text) view, only in the selected page locale.
To append the name of the first author at the end of the breadcrumb path in the abstarct view, following code may be inserted
- Code: Select all
{foreach from=$article->getAuthors() item=author name=authorList}
{if !$firstAutor}
{if $currentLocale eq "en_US"}
{if mb_detect_encoding($author->getFullName(), "ASCII, UTF-8") eq "ASCII"}
{assign var="firstAutor" value="1"}
{$author->getFullName()|escape}
{/if}
{else}
{if mb_detect_encoding($author->getFullName(), "ASCII, UTF-8") eq "UTF-8"}
{assign var="firstAutor" value="1"}
{$author->getFullName()|escape}
{/if}
{/if}
{/if}
{/foreach}
after
- Code: Select all
<a href="{url page="article" op="view" path=$articleId|to_array:$galleyId}" class="current" target="_parent">
Use "en_US" if your ASCII encoding locale is English otherwise replace it accordingly.
Other places containing name of authors may also need similar modification (e.g. search and brwose pages)
An example site is the current issue of Journal of Isfahan Medical School at http://journals.mui.ac.ir/jims
A possible benefit of this method is that you can search the auhtor names in both languages.
Mahmoud
