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

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -