| |
| | |

CodersClub

 Forgot password?
 Register
Search
View: 7259|Reply: 5
Collapse the left

problem when porting the theme from SC version to ML version

[Copy link]

 Vietnam

Post time: 2012-04-30 07:53
| Show all posts |Read mode
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

 Russia

Post time: 2012-04-30 12:38
| Show all posts
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.

 Vietnam

 Author| Post time: 2012-04-30 13:25
| Show all posts
some word is not exist in the pack?

 Russia

Post time: 2012-04-30 15:10
| Show all posts
If a word not found, you can add it into "lang_template.php".

 Vietnam

 Author| Post time: 2012-04-30 15:29
| Show all posts
vot replied at 2012-4-30 16:10
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:
  1. theme folder
  2. |-- common
  3. |-- image
  4. |-- ....
  5. |-- language
  6.           |-- vn
  7.           |-- en
  8.           |-- sc
Copy the Code
is there a way to do this?


 Russia

Post time: 2012-04-30 15:45
| Show all posts
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.
You have to log in before you can reply Login | Register

Points Rules

Archive|Mobile|Dark room|CodersClub

Top.Mail.Ru
Top.Mail.Ru

2024-11-24 08:06 GMT+3 , Processed in 0.054341 sec., 8 queries .

Powered by Discuz! X3.4 Release 20230520

© 2001-2024 Discuz! Team.

MultiLingual version, Rev. 4301, © codersclub.org

Quick Reply To Top Return to the list