LaTeX forum ⇒ Scientific Word/Workplace ⇒ Translation of Identifiers to other Language

Information and discussion about Scientific Word and Scientific Workplace, two commercial WYSIWYG-like editors for Windows
omer21
Posts: 11
Joined: Wed Oct 24, 2012 3:32 pm

Translation of Identifiers to other Language

Hi,

is it possible to translate theorem, definition, lemma, ... strings like to Turkish in SW? For example I want to change "Definition" to "Tanım". If it is possible could you help?

omer21
Posts: 11
Joined: Wed Oct 24, 2012 3:32 pm
I used babel package and I did some changes in preamble for example I replaced
\newtheorem{definition}[theorem]{Definition}
with
\newtheorem{definition}[theorem]{Tanım}

Here is my document code.
\documentclass{article}%\usepackage[turkish]{babel}%\usepackage{amsmath}%\setcounter{MaxMatrixCols}{30}%\usepackage{amsfonts}%\usepackage{amssymb}%\usepackage{graphicx} %BeginMSIPreambleData\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}%EndMSIPreambleData\newtheorem{theorem}{Theorem}\newtheorem{acknowledgement}[theorem]{Acknowledgement}\newtheorem{algorithm}[theorem]{Algorithm}\newtheorem{axiom}[theorem]{Axiom}\newtheorem{case}[theorem]{Case}\newtheorem{claim}[theorem]{Claim}\newtheorem{conclusion}[theorem]{Conclusion}\newtheorem{condition}[theorem]{Condition}\newtheorem{conjecture}[theorem]{Conjecture}\newtheorem{corollary}[theorem]{Sonuç}\newtheorem{criterion}[theorem]{Criterion}\newtheorem{definition}[theorem]{Tanım}\newtheorem{example}[theorem]{Örnek}\newtheorem{exercise}[theorem]{Exercise}\newtheorem{lemma}[theorem]{Lemma}\newtheorem{notation}[theorem]{Notation}\newtheorem{problem}[theorem]{Problem}\newtheorem{proposition}[theorem]{Proposition}\newtheorem{remark}[theorem]{Remark}\newtheorem{solution}[theorem]{Solution}\newtheorem{summary}[theorem]{Summary}\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}\begin{document} \begin{theorem}this is theorem \begin{definition}this is definition \begin{example}this is ex. \begin{corollary}dsfsdf\end{corollary}\end{example}\end{definition}\end{theorem}  \end{document}

I get the output as in the attached image which does not seem properly.
Attachments
identifiers-turkish.jpg (17.88 KiB) Viewed 8103 times
Last edited by localghost on Sat Nov 24, 2012 1:29 pm, edited 1 time in total.
Reason: Preferably no external links (see Board Rules). Attachments go onto the forum server where possible.

cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm
Try adding \usepackage[T1]{fontenc} to your preamble.

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

omer21
Posts: 11
Joined: Wed Oct 24, 2012 3:32 pm
But no luck. I get same output.

localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
In addition to the correct font encoding (by fontenc) you need a corresponding input encoding e.g. by selinput. Add these lines to the document preamble.
\usepackage{selinput}\SelectInputMappings{   % Semi-automatic determination   ccedilla={ç},         % of input encoding   odieresis={ö},        % by a list of selected glyphs   scedilla={ş}          % see: http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt}

Thorsten
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm
Sorry, I suggested the wrong package (although »fontenc« definitely doesn't hurt). You should add
\usepackage[<encoding>]{inputenc}

where <encoding> should be the suiting package option according to the input encoding of your file. For me it is utf8.

Regards

PS: or go with Thorsten's suggestion
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

omer21
Posts: 11
Joined: Wed Oct 24, 2012 3:32 pm
As I know right font encoding is iso-8859-9 (latin5) for Turkish. I tried
\usepackage[latin5]{inputenc}

but it does not work. Also I tried it with Thorsten's suggestion but I got the following error
Package babel Warning: No hyphenation patterns were loaded for(babel)                the language Turkish'(babel)                I will use the patterns loaded for \language=0 instead.  ! LaTeX Error: File selinput.sty' not found.

cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm
omer21 wrote:As i know right font encoding is iso-8859-9 (latin5) for turkish.
I tried
 \usepackage[latin5]{inputenc}

but it does not work.

Not the font encoding is important here (I believe) but the input encoding of your editor. You should check with which encoding your files are saved. The one of »inputenc« should match that.

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

omer21
Posts: 11
Joined: Wed Oct 24, 2012 3:32 pm
cgnieder wrote:Not the font encoding is important here (I believe) but the input encoding of your editor. You should check with which encoding your files are saved. The one of »inputenc« should match that.

Regards

When latin5 >>inputenc<< is in the preamble, i save document with turkish character set. Similarly with utf8 inputenc i save with UT8 character set. In both cases when i preview pdf it does not seem properly.

localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
omer21 wrote:[…] Also i tried it with Thorsten's suggestion but i got the following error
Package babel Warning: No hyphenation patterns were loaded for(babel)                the language Turkish'(babel)                I will use the patterns loaded for \language=0 instead.

This is not part of the error, just a warning. You have to activate the hyphenation patterns for your language. I can't tell you how to do that in SW.
omer21 wrote:
! LaTeX Error: File selinput.sty' not found.

Simply install the package by the package manager of SW (if there is one). It is part of the oberdiek bundle.
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1