fanha99 Publish time 2012-04-30 07:53

problem when porting the theme from SC version to ML version

hi

I'm porting the "Qing" theme from SC version to ML version.
real demo at real site: http://www.chuyennho.vn

I got some problem with the text.
As you can see, still there lot of Chinese in my site, which are included inside the html or js file.

do you have any suggestion to deal with them?

my oppinion, I don't want to add them into the lang pack, because they are used only by that theme.
so I want to make a subfolder "language" inside the the theme folder. but I don't know how to call it.

I hope you can understand me, sorry for my bad English :)

vot Publish time 2012-04-30 12:38

1) Find all the chinese words in the theme files.
2) Find this words in SC language pack.
3) Replace found words with the corresponding (found) lang variables,
like {lang found_lang_keyword} for HTML code,
or lang('found_lang_keyword') for PHP code,
or lng['found_lang_keyword'] for javascript code.

fanha99 Publish time 2012-04-30 13:25

some word is not exist in the pack?

vot Publish time 2012-04-30 15:10

If a word not found, you can add it into "lang_template.php".

fanha99 Publish time 2012-04-30 15:29

vot replied at 2012-4-30 16:10 static/image/common/back.gif
If a word not found, you can add it into "lang_template.php".
as I said at the 1st post.

I don't want to add it into the language pack, some of them is use only for that theme.

if there is the default theme, add it to lang_template.php is ok.

in case you use many theme, and each one have some special text, you will lost control if add all to that file.

beside, it will difficult to share the theme.

I want to do as this:
theme folder
|-- common
|-- image
|-- ....
|-- language
          |-- vn
          |-- en
          |-- scis there a way to do this?


vot Publish time 2012-04-30 15:45

There is no a standard method.
But you can try to do as you wish!
For example, create two files: "lang_theme.php" and "lang_theme.js";
In this file add all the required language variables, both PHP and Javascript!
Then add a function for load this file for current theme.
Then add a theme javascript language call into template header.
Pages: [1]
View full version: problem when porting the theme from SC version to ML version