GithubHelp home page GithubHelp logo

Wpml support. about sage HOT 20 CLOSED

roots avatar roots commented on August 16, 2024
Wpml support.

from sage.

Comments (20)

retlehs avatar retlehs commented on August 16, 2024

i wish i put out roots with i18n support included.. i was thinking we need to follow the guidelines stated here:

http://codex.wordpress.org/I18n_for_WordPress_Developers

how does WPML compare to that?

from sage.

johnraz avatar johnraz commented on August 16, 2024

WPML follows exactly those guidelines but add facilities to run the site multilingual:

  • adds a language switcher
  • enables content translation (posts/pages,custom post types, categories , ....)
  • adds a facility to translate gettext strings in the database instead of po file from the wp backend
  • adds a facility to import / export po file in the db from the wp backend

and more ;-)

from sage.

retlehs avatar retlehs commented on August 16, 2024

i looked through canvas and the only instance of 'wpml' mentioned is the wpml-config.xml file in the theme root (which doesn't look like it does much)

would love to get all text fed through _e though

from sage.

johnraz avatar johnraz commented on August 16, 2024

Yea basically everything we need to do is enable _e syntax on every hardcoded strings of roots, create a wpml-config.xml file (not mandatory though) and make sure that language switcher and alike feature behaves normally. It's not really a lot of work.

I can take care of this and take care of issue #6 also.

from sage.

davidpp avatar davidpp commented on August 16, 2024

Nice to see that you guys are working on it. I just found about this theme and the first question I was asking myself is "please be compatible with WPML"

from sage.

retlehs avatar retlehs commented on August 16, 2024

last week we got into the WPML's 'go global' program and will be starting and closing this issue soon

ps. looks like as of recently WPML has gone commercial

from sage.

johnraz avatar johnraz commented on August 16, 2024

Sweet !
Ben do you have more detail about this ? Or could you point me to a link ?
I should be able to spend some time on the theme this week so i'll give this a look.

Take care ^^

from sage.

johnraz avatar johnraz commented on August 16, 2024

On its way ...

from sage.

johnraz avatar johnraz commented on August 16, 2024

You can check my new wpml-integration branch on my fork.

I have taken care of every strings but left the include folder untouched.
Indeed , I'm waiting for a decision about #5 because if you accept my pull request I'd rather work on the options framework modified files than the actual ones to avoid further conflicts.

from sage.

johnraz avatar johnraz commented on August 16, 2024

While working on this i realized we need to be carreful to keep the theme working when wpml is not enabled. Dunno if wpml's team has something 'built-in' for this or if we need to use a simple if (exist(function()) test.

from sage.

retlehs avatar retlehs commented on August 16, 2024

so far everything works without wpml plugin, i haven't looked any deeper into integration though. the only other files we need to go over are in the includes/ directory [but we should finish up the options stuff first (see my twitter msg) before doing that]

from sage.

johnraz avatar johnraz commented on August 16, 2024

Yea offcourse the gettext use doesnt break anything. I was more thinking of custom areas like the language switcher and so on.

But for now let's stick to the gettext integration.

from sage.

retlehs avatar retlehs commented on August 16, 2024

new options are done, i haven't tested with wpml activated yet but let me know where we are whenever you've got a chance :)

from sage.

retlehs avatar retlehs commented on August 16, 2024

see bc2da28

added a .pot file generated by http://www.icanlocalize.com/tools/php_scanner
i think this ticket might be closed at this point. i'm not sure if we should add a language switcher since WPML includes a widget by default

from sage.

retlehs avatar retlehs commented on August 16, 2024
  1. you'll need both WPML + WPML String Translation plugins enabled
  2. after activating WPML and going through the initial setup, go to WPML > Theme and plugins localization and select Translate by WPML
  3. scroll down to Strings in the theme and click Scan the theme for strings and click View strings that need translation

i'm not sure if that roots.pot file is even necessary.. @johnraz let me know if you have any insight :)

from sage.

johnraz avatar johnraz commented on August 16, 2024

Well the pot file is useful to provide the localization. I'll translate the plugin strings to french ;-)

I don't know about the compatibility though. I think it still needs some in depth testing.

from sage.

retlehs avatar retlehs commented on August 16, 2024

my concern is with keeping the file(s) updated - if WPML already can generate the initial file on the fly is it worth it to include it anyway? i didn't consider including languages already translated, but that does make sense :p i just picture it being a pain to maintain

from sage.

johnraz avatar johnraz commented on August 16, 2024

Well Wpml can handle the translation by itself without the help of the po file.

The only point of the po file is to provide different translations.
Its your call whether or not we should provide translation.

I think we can rely on people with less technical knowledge to contribute to language files and that should keep them up to date... Let's dream @ people helping each other :-p

from sage.

johnraz avatar johnraz commented on August 16, 2024

I didn't have the time to push something about this but for the record: if an option is not declared by default using add_option() function - aka only registering it. Wpml will not recognize it and make it available for translation. So every custom entry in the option page that you want to be translatable must be declared with add_option.

from sage.

retlehs avatar retlehs commented on August 16, 2024

got an email from someone at WPML letting us know that they've tested it and everything is good, they also added roots to http://wpml.org/documentation/theme-compatibility/

from sage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.