필터 지우기
필터 지우기

Is there an easy way to localize an output (set the language)

조회 수: 2 (최근 30일)
Clemens
Clemens 2011년 7월 4일
Mostly I keep my output in english - but quite often I'm asked to produce tables and plots in german.
Till now I was changing the strings in all my scripts. But almost everytime I also add other changes which I would like to reuse. So I end up translating the same lines over and over again.
I wonder - is there an easier way to do it?

채택된 답변

Gerd
Gerd 2011년 7월 4일
Hi Clemens,
I often use a cell arrays to do the language change, e.g.
string{1}='Hello';
string{2} = 'Hallo';
language = 1
disp(string{language})
language = 2
disp(string{language})
When you change the language setting the result is different
Gerd
  댓글 수: 3
Gerd
Gerd 2011년 7월 4일
Usually I put all my "Strings" in a separate file. That is my dictionary :-) In this file I can add or replace or delete different kinds of messages. Of course I can also use some string multiple times......
You are right when you say there might be a more systematic solution but I think the translation in my "dictionary" is better :-)
Clemens
Clemens 2011년 7월 5일
I see. Guess I will try to write a tool for that :P

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by