WordPress.org

Ready to get started?Download WordPress

Forums

Change PHP output language in front end (4 posts)

  1. Addeanton
    Member
    Posted 2 years ago #

    Hello,

    i am having difficulties of chancing the language of example "More >>" and other texts (suchs as "Breadcrums" into my native language which is swedish.

    Have anyone got a tip on a usable plug in with a good understandable guide of how to install the swedish lanaguage?

  2. zimmi88
    Member
    Posted 2 years ago #

    Try here to start: http://codex.wordpress.org/WordPress_in_Your_Language#Swedish_-_Svenska_.28sv_SE.29. That page has information on community-led efforts to provide WordPress core translations for Swedish (and other languages, for that matter).

    Many times, translations are handled by creating translation files, uploading it to wp-content/languages, and setting a configuration variable in wp-config.php. The page also has references to plugins that can enable multi-language support on your site.

    That said, it's worth noting that if you're using a theme or plugin with english words coded into the source, as can often be the case with breadcrumbs, you'll likely need to go through the source and translate where necessary. Language files will usually only translate string defaults and admin text provided by core.

    I hope this helps!

  3. Addeanton
    Member
    Posted 2 years ago #

    Thanks for response!

    I have changed the WPLANG to sv_SE (and have installed .mo-file in language folder).

    But the breadcrums and pagination is still in english..

    "That said, it's worth noting that if you're using a theme or plugin with english words coded into the source, as can often be the case with breadcrumbs, you'll likely need to go through the source and translate where necessary."

    What files is this code embedded into?

  4. zimmi88
    Member
    Posted 2 years ago #

    For theme-based localization, look at the files in wp-content/themes/<your_theme_name>. That directory contains the various template files for a given theme. Plugins are located in wp-content/plugins.

    It could be your theme's author has conveniently set up a language or constants file that you can easily modify. If so, then you can localize those strings. If not, you'll need to go file by file and search for the strings you want to replace.

    Be careful only to replace outputted strings, not function names or internal constants. To be on the safe side, you might want to do this work in a copied version of your theme.

    You'll also need to run your own localization support on version updates to the theme, as any updates have a good chance of overwriting any localization changes.

    I hope this helps!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.