javascript - PHP page change text into constants -
i have php site , want make multilingual. there way parse php pages , find text , replace similar php constants? want make automatic script first find php pages inside find nodes having text inside , replace php constatnt , @ same time add new entry of constant database.
there lot ways. suggest do like
before: <title>hello world</title>
after: <title><?=ts("hello world");?></title>
then write function ts($source)
which cares output right string. easy , comfortable because can continue coding page in english or language , ts() caring everything
Comments
Post a Comment